2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Fix horizontal mouse-look while standing still.

This commit is contained in:
Christian Walther
2012-12-01 21:51:05 -05:00
committed by Adam Johnson
parent d4e9be28ec
commit 5522a10a0c

View File

@ -253,11 +253,6 @@ void plAnimatedMovementStrategy::RecalcVelocity(double timeNow, float elapsed, b
IRecalcLinearVelocity(elapsed, prevMat, curMat);
IRecalcAngularVelocity(elapsed, prevMat, curMat);
// Update controller rotation
float zRot = fAnimAngularVel + fTurnStr;
if (hsABS(zRot) > 0.0001f)
fController->IncrementAngle(zRot * elapsed);
}
else
{
@ -265,6 +260,11 @@ void plAnimatedMovementStrategy::RecalcVelocity(double timeNow, float elapsed, b
fAnimAngularVel = 0.0f;
}
// Update controller rotation
float zRot = fAnimAngularVel + fTurnStr;
if (hsABS(zRot) > 0.0001f)
fController->IncrementAngle(zRot * elapsed);
// Update controller velocity
fController->SetLinearVelocity(fAnimLinearVel);
}