mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Adjust PlayerAngles::doViewPitch()
so that view pitch always resets to 0 upon enabling mouse aiming.
This commit is contained in:
parent
18ef460a99
commit
c1f52b1137
1 changed files with 15 additions and 15 deletions
|
@ -270,22 +270,22 @@ void PlayerAngles::doViewPitch(const bool canslopetilt, const bool climbing)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (climbing)
|
||||
{
|
||||
// tilt when climbing but you can't even really tell it.
|
||||
if (ViewAngles.Pitch > PITCH_HORIZOFFCLIMB)
|
||||
ViewAngles.Pitch += getscaledangle(deltaangle(ViewAngles.Pitch, PITCH_HORIZOFFCLIMB), PITCH_HORIZOFFSPEED, PITCH_HORIZOFFPUSH);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make horizoff grow towards 0 since horizoff is not modified when you're not on a slope.
|
||||
scaletozero(ViewAngles.Pitch, PITCH_HORIZOFFSPEED, PITCH_HORIZOFFPUSH);
|
||||
}
|
||||
|
||||
// Clamp off against the maximum allowed pitch.
|
||||
ViewAngles.Pitch = ClampViewPitch(ViewAngles.Pitch);
|
||||
}
|
||||
|
||||
if (cl_slopetilting && climbing)
|
||||
{
|
||||
// tilt when climbing but you can't even really tell it.
|
||||
if (ViewAngles.Pitch > PITCH_HORIZOFFCLIMB)
|
||||
ViewAngles.Pitch += getscaledangle(deltaangle(ViewAngles.Pitch, PITCH_HORIZOFFCLIMB), PITCH_HORIZOFFSPEED, PITCH_HORIZOFFPUSH);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make horizoff grow towards 0 since horizoff is not modified when you're not on a slope.
|
||||
scaletozero(ViewAngles.Pitch, PITCH_HORIZOFFSPEED, PITCH_HORIZOFFPUSH);
|
||||
}
|
||||
|
||||
// Clamp off against the maximum allowed pitch.
|
||||
ViewAngles.Pitch = ClampViewPitch(ViewAngles.Pitch);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue