summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-08-27 19:26:58 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-08-27 19:26:58 -0700
commit7d54c71aeb6f0829c3c8f8ee68d7b3d542d32b55 (patch)
treea7b5b9a177f50d5fac3266751c735ab2f4460853 /indra/newview
parent839799c2625326c4965443dbf48c0a099b67ecaa (diff)
MAINT-1480: Ensuring that the new angular velocity is remembered for later comparison to the previous angular velocity.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerobject.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 437a078061..9ad8e14510 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1434,9 +1434,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#else
val = (U16 *) &data[count];
#endif
- setAngularVelocity( U16_to_F32(val[VX], -size, size),
- U16_to_F32(val[VY], -size, size),
- U16_to_F32(val[VZ], -size, size));
+ new_angv.set(U16_to_F32(val[VX], -size, size),
+ U16_to_F32(val[VY], -size, size),
+ U16_to_F32(val[VZ], -size, size));
+ setAngularVelocity(new_angv);
break;
case 16:
@@ -1460,9 +1461,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
- setAngularVelocity( U8_to_F32(data[13], -size, size),
- U8_to_F32(data[14], -size, size),
- U8_to_F32(data[15], -size, size) );
+ new_angv.set(U8_to_F32(data[13], -size, size),
+ U8_to_F32(data[14], -size, size),
+ U8_to_F32(data[15], -size, size));
+ setAngularVelocity(new_angv);
break;
}
@@ -1534,9 +1536,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackU16(val[VX], "AccX");
dp->unpackU16(val[VY], "AccY");
dp->unpackU16(val[VZ], "AccZ");
- setAngularVelocity( U16_to_F32(val[VX], -64.f, 64.f),
- U16_to_F32(val[VY], -64.f, 64.f),
- U16_to_F32(val[VZ], -64.f, 64.f));
+ new_angv.set(U16_to_F32(val[VX], -64.f, 64.f),
+ U16_to_F32(val[VY], -64.f, 64.f),
+ U16_to_F32(val[VZ], -64.f, 64.f));
+ setAngularVelocity(new_angv);
}
break;
case OUT_FULL_COMPRESSED:
@@ -1580,8 +1583,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (value & 0x80)
{
- dp->unpackVector3(vec, "Omega");
- setAngularVelocity(vec);
+ dp->unpackVector3(new_angv, "Omega");
+ setAngularVelocity(new_angv);
}
if (value & 0x20)