diff options
author | McCabe Maxsted | 2009-03-01 04:28:19 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-03-01 04:28:19 -0700 |
commit | f501ad0679ae8096818684285397d6b59388a41b (patch) | |
tree | 49e4ee594ef6e1fc4159a94206b53a83dfaa327b | |
parent | Backported possible crash fix in llfloater.cpp from 1.22 (diff) | |
download | meta-impy-f501ad0679ae8096818684285397d6b59388a41b.zip meta-impy-f501ad0679ae8096818684285397d6b59388a41b.tar.gz meta-impy-f501ad0679ae8096818684285397d6b59388a41b.tar.bz2 meta-impy-f501ad0679ae8096818684285397d6b59388a41b.tar.xz |
Backported fix for VWR-3871 (prim position appears to be off) from 1.22
-rw-r--r-- | ChangeLog.txt | 3 | ||||
-rw-r--r-- | linden/indra/newview/lldrawable.cpp | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 5fdd770..1f33ca1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -24,6 +24,9 @@ | |||
24 | * linden/indra/llui/llfloater.cpp: | 24 | * linden/indra/llui/llfloater.cpp: |
25 | Backported possible crash fix in llfloater.cpp from 1.22. | 25 | Backported possible crash fix in llfloater.cpp from 1.22. |
26 | 26 | ||
27 | * linden/indra/newview/lldrawable.cpp: | ||
28 | Backported fix for VWR-3871 (prim position appears to be off) from 1.22. | ||
29 | |||
27 | 30 | ||
28 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | 31 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
29 | =- 1.1.0 RC2 -= | 32 | =- 1.1.0 RC2 -= |
diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index 5e4aafc..e058681 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp | |||
@@ -497,7 +497,7 @@ F32 LLDrawable::updateXform(BOOL undamped) | |||
497 | F32 dist_squared = 0.f; | 497 | F32 dist_squared = 0.f; |
498 | F32 camdist2 = (mDistanceWRTCamera * mDistanceWRTCamera); | 498 | F32 camdist2 = (mDistanceWRTCamera * mDistanceWRTCamera); |
499 | 499 | ||
500 | if (damped && mDistanceWRTCamera > 0.0f) | 500 | if (damped && isVisible()) |
501 | { | 501 | { |
502 | F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f); | 502 | F32 lerp_amt = llclamp(LLCriticalDamp::getInterpolant(OBJECT_DAMPING_TIME_CONSTANT), 0.f, 1.f); |
503 | LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt); | 503 | LLVector3 new_pos = lerp(old_pos, target_pos, lerp_amt); |
@@ -521,11 +521,19 @@ F32 LLDrawable::updateXform(BOOL undamped) | |||
521 | { | 521 | { |
522 | // snap to final position | 522 | // snap to final position |
523 | dist_squared = 0.0f; | 523 | dist_squared = 0.0f; |
524 | if (!isRoot()) | ||
525 | { //child prim snapping to some position, needs a rebuild | ||
526 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); | ||
527 | } | ||
524 | } | 528 | } |
525 | } | 529 | } |
526 | 530 | ||
527 | if ((mCurrentScale != target_scale) || | 531 | if ((mCurrentScale != target_scale) || |
528 | (!isRoot() && (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || !mVObjp->getAngularVelocity().isExactlyZero())) | 532 | (!isRoot() && |
533 | (dist_squared >= MIN_INTERPOLATE_DISTANCE_SQUARED) || | ||
534 | !mVObjp->getAngularVelocity().isExactlyZero() || | ||
535 | target_pos != mXform.getPosition() || | ||
536 | target_rot != mXform.getRotation())) | ||
529 | { //child prim moving or scale change requires immediate rebuild | 537 | { //child prim moving or scale change requires immediate rebuild |
530 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); | 538 | gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE); |
531 | } | 539 | } |