Cap underwater steering tilting

This commit is contained in:
James R 2021-12-06 20:35:26 -08:00
parent ab77bceb88
commit 84170a59fa

View file

@ -1775,7 +1775,20 @@ static void P_3dMovement(player_t *player)
if (a)
{
adj = a / 4;
const fixed_t maxadj = ANG10/4;
adj = a / 4;
if (adj > 0)
{
if (adj > maxadj)
adj = maxadj;
}
else if (adj < 0)
{
if (adj < -(maxadj))
adj = -(maxadj);
}
if (abs(player->underwatertilt + adj) > abs(a))
adj = (a - player->underwatertilt);