diff options
author | Mark Palange <palange@lindenlab.com> | 2009-02-03 21:15:57 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2009-02-03 21:15:57 +0000 |
commit | 46f8fb8781ccce338b4a88aaf8371ee3dec56d29 (patch) | |
tree | b2dc09521a166d2181c48f4a4f1ca90b83b99477 /indra/newview/lldrawable.cpp | |
parent | e188badaf29a1a02307f93864eed6737096bd9a1 (diff) |
svn merge -r107016:108767 svn+ssh://svn.lindenlab.com/svn/linden/viewer/viewer_1-22
Merge back of viewer 1.22 RC6 and RC7 change to trunk.
QAR-1214 and QAR-1227
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r-- | indra/newview/lldrawable.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index a0572b7a2c..d5619f2bf0 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -499,7 +499,7 @@ F32 LLDrawable::updateXform(BOOL undamped) F32 dist_squared = 0.f; F32 camdist2 = (mDistanceWRTCamera * mDistanceWRTCamera); - if (damped && mDistanceWRTCamera > 0.0f) + if (damped && isVisible()) { F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f); LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt); @@ -523,11 +523,19 @@ F32 LLDrawable::updateXform(BOOL undamped) { // snap to final position dist_squared = 0.0f; + if (!isRoot()) + { //child prim snapping to some position, needs a rebuild + gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); + } } } if ((mCurrentScale != target_scale) || - (!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || !mVObjp->getAngularVelocity().isExactlyZero())) + (!isRoot() && + (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || + !mVObjp->getAngularVelocity().isExactlyZero() || + target_pos != mXform.getPosition() || + target_rot != mXform.getRotation())) { //child prim moving or scale change requires immediate rebuild gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); } |