Skip to content

Commit

Permalink
- Exhumed: Add CVAR to control vert panning intensity.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjr4077au committed Jan 5, 2024
1 parent 0edc69c commit 35c22c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions source/core/gamecvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ CVARD(Bool, cl_bloodweapinterp, false, CVAR_ARCHIVE, "enable/disable Blood's wea
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, "clamp the view pitch to original ranges")
CVARD(Float, cl_exvertpanscale, 8.f, CVAR_ARCHIVE, "sets the scaling intensity for Exhumed's vert panning/slope tilting")

CUSTOM_CVARD(Int, cl_dukepitchmode, 7, CVAR_ARCHIVE, "customise Duke's myriad of pitch options")
{
Expand Down
1 change: 1 addition & 0 deletions source/core/gamecvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ EXTERN_CVAR(Bool, cl_bloodoldweapbalance)
EXTERN_CVAR(Bool, cl_loadingscreens)
EXTERN_CVAR(Bool, cl_clampedpitch)
EXTERN_CVAR(Int, cl_dukepitchmode)
EXTERN_CVAR(Float, cl_exvertpanscale)

EXTERN_CVAR(Bool, demorec_seeds_cvar)
EXTERN_CVAR(Bool, demoplay_diffs)
Expand Down
4 changes: 2 additions & 2 deletions source/games/exhumed/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,8 +1539,8 @@ static void doPlayerCameraEffects(DExhumedPlayer* const pPlayer, const double zD
const auto nUnderwater = !!(pPlayerActor->sector()->Flag & kSectUnderwater);

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

// Roll tilting effect, either console or Quake-style.
pPlayer->doRollInput(nUnderwater);
Expand Down
4 changes: 4 additions & 0 deletions wadsrc/static/menudef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,10 @@ OptionMenu "VideoOptions" protected
Option "$DSPLYMNU_VOXELS", "r_voxels", "OnOff"
Option "$DSPLYMNU_SHADOWS", "r_shadows", "OnOff"
Option "$DSPLYMNU_SLOPETILT", "cl_slopetilting", "OnOff"
ifgame(Exhumed)
{
Slider "$DSPLYMNU_EXVERTPANNING", "cl_exvertpanscale", 0.5, 10, 0.1
}
Option "$GLPREFMNU_ENVIRONMENTMAPMIRROR", gl_mirror_envmap, "OnOff"
ifnotgame(Blood, Exhumed)
{
Expand Down

0 comments on commit 35c22c5

Please sign in to comment.