summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-09-17 14:54:35 -0400
committerOz Linden <oz@lindenlab.com>2012-09-17 14:54:35 -0400
commitf44bde8a8f0f11577543a4b1122d63854adcb3f4 (patch)
tree2514197051218095758a815e614a807acc8e035e /indra/newview
parent5374732db2c8e4a95e2ecbb155c8919cd32bc342 (diff)
parent29aace5692da95c3937368b8f33b9c88112acbed (diff)
pull back fixes from 3.4.0-beta7
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerobject.cpp14
-rw-r--r--indra/newview/llviewerobject.h1
2 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 0a6c51b378..97783d843e 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -236,6 +236,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTimeDilation(1.f),
mRotTime(0.f),
mAngularVelocityRot(),
+ mPreviousRotation(),
mJointInfo(NULL),
mState(0),
mMedia(NULL),
@@ -2072,10 +2073,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- if (new_rot != getRotation()
- || new_angv != old_angv)
+ if ((new_rot != getRotation())
+ || (new_angv != old_angv))
{
- if (new_angv != old_angv)
+ if (new_rot != mPreviousRotation)
+ {
+ resetRot();
+ }
+ else if (new_angv != old_angv)
{
if (flagUsePhysics() || new_angv.isExactlyZero())
{
@@ -2087,6 +2092,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
+ // Remember the last rotation value
+ mPreviousRotation = new_rot;
+
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
setChanged(ROTATED | SILHOUETTE);
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 83e34dc6ca..fbf6361ffb 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -734,6 +734,7 @@ protected:
F32 mTimeDilation; // Time dilation sent with the object.
F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
+ LLQuaternion mPreviousRotation;
LLVOJointInfo* mJointInfo;
U8 mState; // legacy