diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lldrawable.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index 6a7ff16..16b282b 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp | |||
@@ -498,7 +498,7 @@ F32 LLDrawable::updateXform(BOOL undamped) | |||
498 | F32 dist_squared = 0.f; | 498 | F32 dist_squared = 0.f; |
499 | F32 camdist2 = (mDistanceWRTCamera * mDistanceWRTCamera); | 499 | F32 camdist2 = (mDistanceWRTCamera * mDistanceWRTCamera); |
500 | 500 | ||
501 | if (damped && mDistanceWRTCamera > 0.0f) | 501 | if (damped && isVisible()) |
502 | { | 502 | { |
503 | F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f); | 503 | F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f); |
504 | LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt); | 504 | LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt); |
@@ -522,11 +522,19 @@ F32 LLDrawable::updateXform(BOOL undamped) | |||
522 | { | 522 | { |
523 | // snap to final position | 523 | // snap to final position |
524 | dist_squared = 0.0f; | 524 | dist_squared = 0.0f; |
525 | if (!isRoot()) | ||
526 | { //child prim snapping to some position, needs a rebuild | ||
527 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); | ||
528 | } | ||
525 | } | 529 | } |
526 | } | 530 | } |
527 | 531 | ||
528 | if ((mCurrentScale != target_scale) || | 532 | if ((mCurrentScale != target_scale) || |
529 | (!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || !mVObjp->getAngularVelocity().isExactlyZero())) | 533 | (!isRoot() && |
534 | (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || | ||
535 | !mVObjp->getAngularVelocity().isExactlyZero() || | ||
536 | target_pos != mXform.getPosition() || | ||
537 | target_rot != mXform.getRotation())) | ||
530 | { //child prim moving or scale change requires immediate rebuild | 538 | { //child prim moving or scale change requires immediate rebuild |
531 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); | 539 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); |
532 | } | 540 | } |