diff options
author | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2017-04-24 20:19:48 +0300 |
---|---|---|
committer | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2017-04-24 20:19:48 +0300 |
commit | 334dfe0587ee374b478a41a04bc4ebcd11d3b7af (patch) | |
tree | aa6e61d2ba43edf8a6c02ccfc6cc3dba7088f800 | |
parent | cbffc8194cd6e3f4cbfc20b372e5ec86448b9cbc (diff) |
MAINT-6275 - Child prim not touchable after being resized and moved relative to root prim by script.
FIXED.
It's a very important on each cycle on Drawable::update form(), when object
remained in move, list update the CurrentScale member, because if do not do that,
it remained in this list forever or when the delta time between two frames
a become a sufficiently large (due to interpolation)
for overcome the MIN_INTERPOLATE_DISTANCE_SQUARED.
-rw-r--r-- | indra/newview/lldrawable.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index aa67ea2524..0c47e0f0ee 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -618,7 +618,7 @@ F32 LLDrawable::updateXform(BOOL undamped) BOOL damped = !undamped; // Position - LLVector3 old_pos(mXform.getPosition()); + const LLVector3 old_pos(mXform.getPosition()); LLVector3 target_pos; if (mXform.isRoot()) { @@ -632,7 +632,7 @@ F32 LLDrawable::updateXform(BOOL undamped) } // Rotation - LLQuaternion old_rot(mXform.getRotation()); + const LLQuaternion old_rot(mXform.getRotation()); LLQuaternion target_rot = mVObjp->getRotation(); //scaling LLVector3 target_scale = mVObjp->getScale(); @@ -667,6 +667,8 @@ F32 LLDrawable::updateXform(BOOL undamped) { // snap to final position (only if no target omega is applied) dist_squared = 0.0f; + mCurrentScale = target_scale; + if (getVOVolume() && !isRoot()) { //child prim snapping to some position, needs a rebuild gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); @@ -683,11 +685,11 @@ F32 LLDrawable::updateXform(BOOL undamped) //dist_squared += dist_vec_squared(old_scale, target_scale); } - LLVector3 vec = mCurrentScale-target_scale; + const LLVector3 vec = mCurrentScale-target_scale; + mCurrentScale = target_scale; if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED) { //scale change requires immediate rebuild - mCurrentScale = target_scale; gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } else if (!isRoot() && |