Tiny cleanup

This commit is contained in:
Siana Gearz
2013-01-02 22:56:04 +01:00
parent 66083d6531
commit e732e62b39
2 changed files with 11 additions and 23 deletions

View File

@@ -2116,32 +2116,28 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
static const LLCachedControl<bool> use_new_target_omega ("UseNewTargetOmegaCode", true);
if (use_new_target_omega)
{ // New, experimental code
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)
{
if (new_rot != mPreviousRotation)
resetRot();
}
else if (new_angv != old_angv)
{
if (flagUsePhysics())
{
resetRot();
}
else if (new_angv != old_angv)
else
{
if (flagUsePhysics())
{
resetRot();
}
else
{
mRotTime = 0.0f;
}
mRotTime = 0.0f;
}
}
// Remember the last rotation value
mPreviousRotation = new_rot;
// Set the rotation of the object followed by adjusting for the
// accumulated angular velocity (llSetTargetOmega)
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
setChanged(ROTATED | SILHOUETTE);
}