From 094c717ea88c3736f885d8fef417ff73328adc6a Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 14 Aug 2012 19:10:46 -0700 Subject: PATH-842: Another tweak to get the llSetTargetOmega functionality working in the viewer. --- indra/newview/llviewerobject.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerobject.cpp') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fc8192f14b..bbbf071570 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2075,7 +2075,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { if (new_angv != old_angv) { - resetRot(); + resetRotTime(); } // Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega) @@ -5547,9 +5547,14 @@ void LLViewerObject::applyAngularVelocity(F32 dt) } } -void LLViewerObject::resetRot() +void LLViewerObject::resetRotTime() { mRotTime = 0.0f; +} + +void LLViewerObject::resetRot() +{ + resetRotTime(); // Reset the accumulated angular velocity rotation mAngularVelocityRot.loadIdentity(); -- cgit v1.2.3 From 6df52172c1509c902f9dafa9277981532a72a9d6 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 17 Aug 2012 15:43:13 -0700 Subject: MAINT-1439: BUGFIX Correcting Kart 1.0 issue with physical objects using angular velocity. --- indra/newview/llviewerobject.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerobject.cpp') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index bbbf071570..6c4e70add0 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2075,7 +2075,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, { if (new_angv != old_angv) { - resetRotTime(); + if (flagUsePhysics()) + { + resetRot(); + } + else + { + resetRotTime(); + } } // Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega) -- cgit v1.2.3