diff --git a/source/core/gamecvars.cpp b/source/core/gamecvars.cpp index 867f5787c..138710112 100644 --- a/source/core/gamecvars.cpp +++ b/source/core/gamecvars.cpp @@ -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") diff --git a/source/core/gamecvars.h b/source/core/gamecvars.h index b55f36023..b43b9c876 100644 --- a/source/core/gamecvars.h +++ b/source/core/gamecvars.h @@ -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) diff --git a/source/core/gamefuncs.h b/source/core/gamefuncs.h index 24dda2b6f..5ef3b7993 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -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)