Loops: guarantee exit at exact intended angle

This commit is contained in:
James R 2023-10-13 21:17:03 -07:00
parent 428106c014
commit 107809d876

View file

@ -160,13 +160,18 @@ boolean P_PlayerOrbit(player_t *player)
left = (s->max_revolution - s->revolution);
if (abs(left) < abs(step))
if (left == 0)
{
P_ExitPlayerOrbit(player);
return false;
}
if (abs(left) < abs(step))
{
step = left;
}
// If player slows down by too much, throw them out of
// the loop in a tumble.
if (player->speed < player->mo->scale)