Skip to content

Commit 35c22c5

Browse files
committed
- Exhumed: Add CVAR to control vert panning intensity.
1 parent 0edc69c commit 35c22c5

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

source/core/gamecvars.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ CVARD(Bool, cl_bloodweapinterp, false, CVAR_ARCHIVE, "enable/disable Blood's wea
9797
CVARD(Bool, cl_bloodoldweapbalance, false, CVAR_ARCHIVE, "enable/disable legacy 1.0 weapon handling for Blood")
9898
CVARD(Bool, cl_loadingscreens, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable loading screens for games")
9999
CVARD(Bool, cl_clampedpitch, true, CVAR_ARCHIVE, "clamp the view pitch to original ranges")
100+
CVARD(Float, cl_exvertpanscale, 8.f, CVAR_ARCHIVE, "sets the scaling intensity for Exhumed's vert panning/slope tilting")
100101

101102
CUSTOM_CVARD(Int, cl_dukepitchmode, 7, CVAR_ARCHIVE, "customise Duke's myriad of pitch options")
102103
{

source/core/gamecvars.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ EXTERN_CVAR(Bool, cl_bloodoldweapbalance)
4444
EXTERN_CVAR(Bool, cl_loadingscreens)
4545
EXTERN_CVAR(Bool, cl_clampedpitch)
4646
EXTERN_CVAR(Int, cl_dukepitchmode)
47+
EXTERN_CVAR(Float, cl_exvertpanscale)
4748

4849
EXTERN_CVAR(Bool, demorec_seeds_cvar)
4950
EXTERN_CVAR(Bool, demoplay_diffs)

source/games/exhumed/src/player.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,8 +1539,8 @@ static void doPlayerCameraEffects(DExhumedPlayer* const pPlayer, const double zD
15391539
const auto nUnderwater = !!(pPlayerActor->sector()->Flag & kSectUnderwater);
15401540

15411541
// Pitch tilting when player's Z changes (stairs, jumping, etc).
1542-
// This should amplified 8x, not 2x, but it feels very heavy. Add a CVAR?
1543-
doPlayerVertPanning(pPlayer, zDelta * 2 * cl_slopetilting);
1542+
// The default 8x amplification feels very heavy, so add a CVAR to control it.
1543+
doPlayerVertPanning(pPlayer, zDelta * cl_exvertpanscale * cl_slopetilting);
15441544

15451545
// Roll tilting effect, either console or Quake-style.
15461546
pPlayer->doRollInput(nUnderwater);

wadsrc/static/menudef.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,10 @@ OptionMenu "VideoOptions" protected
11221122
Option "$DSPLYMNU_VOXELS", "r_voxels", "OnOff"
11231123
Option "$DSPLYMNU_SHADOWS", "r_shadows", "OnOff"
11241124
Option "$DSPLYMNU_SLOPETILT", "cl_slopetilting", "OnOff"
1125+
ifgame(Exhumed)
1126+
{
1127+
Slider "$DSPLYMNU_EXVERTPANNING", "cl_exvertpanscale", 0.5, 10, 0.1
1128+
}
11251129
Option "$GLPREFMNU_ENVIRONMENTMAPMIRROR", gl_mirror_envmap, "OnOff"
11261130
ifnotgame(Blood, Exhumed)
11271131
{

0 commit comments

Comments
 (0)