mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Loops: guarantee exit at exact intended angle
This commit is contained in:
parent
428106c014
commit
107809d876
1 changed files with 6 additions and 1 deletions
|
|
@ -160,13 +160,18 @@ boolean P_PlayerOrbit(player_t *player)
|
||||||
|
|
||||||
left = (s->max_revolution - s->revolution);
|
left = (s->max_revolution - s->revolution);
|
||||||
|
|
||||||
if (abs(left) < abs(step))
|
if (left == 0)
|
||||||
{
|
{
|
||||||
P_ExitPlayerOrbit(player);
|
P_ExitPlayerOrbit(player);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (abs(left) < abs(step))
|
||||||
|
{
|
||||||
|
step = left;
|
||||||
|
}
|
||||||
|
|
||||||
// If player slows down by too much, throw them out of
|
// If player slows down by too much, throw them out of
|
||||||
// the loop in a tumble.
|
// the loop in a tumble.
|
||||||
if (player->speed < player->mo->scale)
|
if (player->speed < player->mo->scale)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue