diff options
author | Dave Parks <davep@lindenlab.com> | 2012-04-19 17:29:32 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-04-19 17:29:32 -0500 |
commit | d953cce3868cf53b3f84e1fdd97119c83d3dff7d (patch) | |
tree | 3968b54b780ee7849d35acdeffb034d11eba65f8 /indra/newview/lldrawable.cpp | |
parent | 5334c410ea7552ebc2c758ee8911b3235f76824a (diff) |
MAINT-775 Cleanup of some weird corner cases on animated child prims.
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r-- | indra/newview/lldrawable.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 3b55ac4a3b..e06242055c 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -182,7 +182,7 @@ LLVOVolume* LLDrawable::getVOVolume() const const LLMatrix4& LLDrawable::getRenderMatrix() const { - return isRoot() || isState(LLDrawable::ANIMATED_CHILD) ? getWorldMatrix() : getParent()->getWorldMatrix(); + return isRoot() ? getWorldMatrix() : getParent()->getWorldMatrix(); } BOOL LLDrawable::isLight() const @@ -538,13 +538,12 @@ F32 LLDrawable::updateXform(BOOL undamped) target_rot = new_rot; target_scale = new_scale; } - else + else if (mVObjp->getAngularVelocity().isExactlyZero()) { - // snap to final position + // snap to final position (only if no target omega is applied) dist_squared = 0.0f; - if (getVOVolume() && !isRoot() && !isState(LLDrawable::ANIMATED_CHILD)) + if (getVOVolume() && !isRoot()) { //child prim snapping to some position, needs a rebuild - setState(LLDrawable::ANIMATED_CHILD); gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } } @@ -558,8 +557,7 @@ F32 LLDrawable::updateXform(BOOL undamped) gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } else if (!isRoot() && - (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED || - !mVObjp->getAngularVelocity().isExactlyZero() || + (!mVObjp->getAngularVelocity().isExactlyZero() || target_pos != mXform.getPosition() || target_rot != mXform.getRotation())) { //child prim moving relative to parent, tag as needing to be rendered atomically and rebuild |