mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-07 18:42:36 +00:00
Smoothly interpolate the player pitch-centering action
This commit is contained in:
parent
a872097da1
commit
74a04474e1
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue