mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-18 18:30:59 +00:00
Fixed the return value of TurnActorTo.
It must return true if the target yaw is different from the actual yaw of the actor, and false otherwise.
This commit is contained in:
parent
d4454dc2ce
commit
ce356f9d4b
@ -1467,10 +1467,15 @@ static void TurnActorTo() {
|
||||
float yaw = lookVector.unitCircleAngle();
|
||||
// yaw is offset from forward by 90 degrees
|
||||
yaw -= 90.0f;
|
||||
if (yaw < 0) {
|
||||
yaw += 360.f;
|
||||
}
|
||||
actor->turnTo(0, yaw, 0);
|
||||
|
||||
// Game will lock in elevator if this doesn't return false
|
||||
pushbool(false);
|
||||
float diff = actor->yaw() - yaw;
|
||||
// Return true if the actor is still turning and its yaw is not the target one.
|
||||
// This allows manny to have the right yaw when he exits the elevator in the garage
|
||||
pushbool((diff > 0.005) || (diff < -0.005)); //fuzzy compare
|
||||
}
|
||||
|
||||
static void PointActorAt() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user