diff options
author | callum_linden <none@none> | 2013-04-17 13:38:04 -0700 |
---|---|---|
committer | callum_linden <none@none> | 2013-04-17 13:38:04 -0700 |
commit | 88eff41649b13f00f636e54e093fd5b8becf5f8c (patch) | |
tree | f099a81df2c66e9940aa85ad1f47cc982a5eecc1 /indra/newview/llflexibleobject.cpp | |
parent | 010c87788d5c698d6cfe5782ac02d9a3924124cf (diff) | |
parent | fac6ee27f2d3277494f011271064b0e5e7e02554 (diff) |
Merge with viewer-development
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rw-r--r-- | indra/newview/llflexibleobject.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 77a0cdffce..caad0afec0 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -270,9 +270,6 @@ void LLVolumeImplFlexible::setAttributesOfAllSections(LLVector3* inScale) mSection[0].mVelocity.setVec(0,0,0); mSection[0].mAxisRotation.setQuat(begin_rot,0,0,1); - LLVector3 parentSectionPosition = mSection[0].mPosition; - LLVector3 last_direction = mSection[0].mDirection; - remapSections(mSection, mInitializedRes, mSection, mSimulateRes); mInitializedRes = mSimulateRes; @@ -342,10 +339,10 @@ void LLVolumeImplFlexible::doIdleUpdate() if (drawablep) { //LLFastTimer ftm(FTM_FLEXIBLE_UPDATE); - + //ensure drawable is active drawablep->makeActive(); - + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) { bool visible = drawablep->isVisible(); @@ -381,21 +378,31 @@ void LLVolumeImplFlexible::doIdleUpdate() id = parent->getVolumeInterfaceID(); } - if ((LLDrawable::getCurrentFrame()+id)%update_period == 0) - { + if (mVO->isRootEdit()) + { + id = mID; + } + else + { + LLVOVolume* parent = (LLVOVolume*) mVO->getParent(); + id = parent->getVolumeInterfaceID(); + } + + if ((LLDrawable::getCurrentFrame()+id)%update_period == 0) + { sUpdateDelay[mInstanceIndex] = (S32) update_period-1; - updateRenderRes(); + updateRenderRes(); - gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); - } - } + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); } + } + } else { sUpdateDelay[mInstanceIndex] = (S32) update_period; - } - } + } +} } } @@ -420,7 +427,6 @@ void LLVolumeImplFlexible::doFlexibleUpdate() if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) { BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE; - doIdleUpdate(); if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) @@ -435,7 +441,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() return ; } - // stinson 11/12/2012: Need to check with davep on the following. + // Fix for MAINT-1894 // Skipping the flexible update if render res is negative. If we were to continue with a negative value, // the subsequent S32 num_render_sections = 1<<mRenderRes; code will specify a really large number of // render sections which will then create a length exception in the std::vector::resize() method. |