Some transform update fixes.

Thanks to MartinRJ and Henri for updateXform poking.
This commit is contained in:
Siana Gearz
2013-02-17 15:23:25 +01:00
parent dc3f91b121
commit ef4c7d9433
2 changed files with 18 additions and 10 deletions

View File

@@ -1445,8 +1445,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
val = (U16 *) &data[count];
#endif
new_angv.set(U16_to_F32(val[VX], -size, size),
U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size));
U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size));
setAngularVelocity(new_angv);
break;
@@ -1471,9 +1471,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;
}
@@ -1545,9 +1546,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:
@@ -1591,8 +1593,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)