diff options
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rw-r--r-- | indra/newview/llflexibleobject.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 5a7a12c38d..3107b062b7 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -232,12 +232,6 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons //--------------------------------------------------------------------------------- BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) - { - return FALSE; // (we are not initialized or updated) - } - - LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); if (mVO->mDrawable.isNull()) { @@ -252,6 +246,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); parent->mDrawable->mQuietCount = 0; } + + LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); S32 new_res = mAttributes->getSimulateLOD(); @@ -264,6 +260,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 { mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; } + + // Bottom cap at 1/4 the original number of sections if (mRenderRes < mAttributes->getSimulateLOD()-1) { @@ -281,6 +279,10 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 setAttributesOfAllSections(); mInitialized = TRUE; } + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) + { + return FALSE; // (we are not initialized or updated) + } if (mVO->mDrawable->isVisible() && !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && @@ -604,7 +606,7 @@ void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) { - LLVOVolume *volume = (LLVOVolume*)mVO; + LLVOVolume *volume = (LLVOVolume*)mVO.get(); if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is... { @@ -720,7 +722,7 @@ void LLVolumeImplFlexible::updateRelativeXform() { LLQuaternion delta_rot; LLVector3 delta_pos, delta_scale; - LLVOVolume* vo = (LLVOVolume*) mVO; + LLVOVolume* vo = (LLVOVolume*) mVO.get(); //matrix from local space to parent relative/global space delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation(); |