Smoothly interpolate the player pitch-centering action

This commit is contained in:
nashmuhandes 2025-02-04 22:10:16 +08:00 committed by Rachael Alexanderson
parent a872097da1
commit 74a04474e1

View file

@ -1401,15 +1401,17 @@ class PlayerPawn : Actor
{
if (abs(Pitch) > 2.)
{
Pitch *= (2. / 3.);
A_SetPitch(Pitch * (2. / 3.), SPF_INTERPOLATE);
}
else
{
Pitch = 0.;
player.centering = false;
if (PlayerNumber() == consoleplayer)
A_SetPitch(Pitch * 0.75, SPF_INTERPOLATE);
if (abs(Pitch) <= 0.25)
{
LocalViewPitch = 0;
A_SetPitch(0., SPF_INTERPOLATE);
player.centering = false;
if (PlayerNumber() == consoleplayer)
LocalViewPitch = 0;
}
}
}