- Add CVAR to allow unclamping the player's view pitch.

This commit is contained in:
Mitchell Richters 2022-09-27 18:04:09 +10:00 committed by Christoph Oelckers
parent 8d3f3c6025
commit 1e19b32b59
3 changed files with 4 additions and 2 deletions

View file

@ -89,6 +89,7 @@ CVARD(Bool, cl_bloodqavinterp, true, CVAR_ARCHIVE, "enable/disable Blood's QAV i
CVARD(Bool, cl_bloodweapinterp, false, CVAR_ARCHIVE, "enable/disable Blood's weapon interpolation. Depends on 'cl_bloodqavinterp'")
CVARD(Bool, cl_bloodoldweapbalance, false, CVAR_ARCHIVE, "enable/disable legacy 1.0 weapon handling for Blood")
CVARD(Bool, cl_loadingscreens, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable loading screens for games")
CVARD(Bool, cl_clampedpitch, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "clamp the view pitch to original ranges")
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")

View file

@ -35,6 +35,7 @@ EXTERN_CVAR(Bool, cl_bloodqavinterp)
EXTERN_CVAR(Bool, cl_bloodweapinterp)
EXTERN_CVAR(Bool, cl_bloodoldweapbalance)
EXTERN_CVAR(Bool, cl_loadingscreens)
EXTERN_CVAR(Bool, cl_clampedpitch)
EXTERN_CVAR(Bool, demorec_seeds_cvar)
EXTERN_CVAR(Bool, demoplay_diffs)

View file

@ -538,12 +538,12 @@ inline double BobVal(double val)
inline DAngle GetMinPitch()
{
return gi->playerPitchMin();
return !cl_clampedpitch ? -DAngle90 : gi->playerPitchMin();
}
inline DAngle GetMaxPitch()
{
return gi->playerPitchMax();
return !cl_clampedpitch ? DAngle90 : gi->playerPitchMax();
}
inline DAngle ClampViewPitch(const DAngle pitch)