- SW: Rename cl_smoothsway to cl_swsmoothsway and enable by default

This commit is contained in:
Mitchell Richters 2021-07-10 22:07:05 +10:00
parent 55cef642b6
commit 5d7938c24e
3 changed files with 3 additions and 16 deletions

View file

@ -77,7 +77,7 @@ CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting"
CVARD(Int, cl_showweapon, 1, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood
CVARD(Bool, cl_sointerpolation, true, CVAR_ARCHIVE, "enable/disable sector object interpolation") // only implemented in SW
CVARD(Bool, cl_syncinput, false, CVAR_ARCHIVE, "enable/disable synchronized input with game's ticrate") // only implemented in Duke
CVARD(Bool, cl_smoothsway, false, CVAR_ARCHIVE, "move SW weapon left and right smoothly while bobbing")
CVARD(Bool, cl_swsmoothsway, true, CVAR_ARCHIVE, "move SW weapon left and right smoothly while bobbing")
CVARD(Bool, cl_showmagamt, false, CVAR_ARCHIVE, "show the amount of rounds left in the magazine of your weapon on the modern HUD")
CVARD(Bool, cl_nomeleeblur, false, CVAR_ARCHIVE, "enable/disable blur effect with melee weapons in SW")
CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turning speed for Powerslave/Exhumed")

View file

@ -22,7 +22,7 @@ EXTERN_CVAR(Int, cl_weaponswitch)
EXTERN_CVAR(Float, crosshairscale)
EXTERN_CVAR(Bool, cl_sointerpolation)
EXTERN_CVAR(Bool, cl_syncinput)
EXTERN_CVAR(Bool, cl_smoothsway)
EXTERN_CVAR(Bool, cl_swsmoothsway)
EXTERN_CVAR(Bool, cl_showmagamt)
EXTERN_CVAR(Bool, cl_nomeleeblur)
EXTERN_CVAR(Bool, cl_exhumedoldturn)

View file

@ -6548,20 +6548,7 @@ pWeaponBob(PANEL_SPRITEp psp, short condition)
// //
// increment the ndx into the sin table
psp->sin_ndx = psp->sin_ndx + (synctics << 3);
// add an additional increment to ndx
if (cl_smoothsway)
{
// add a fixed factor to it
psp->sin_ndx += (synctics << 2);
}
else
{
// add a random factor to it
psp->sin_ndx += (RANDOM_P2(8) * synctics);
}
// wrap
psp->sin_ndx &= 2047;
psp->sin_ndx = (psp->sin_ndx + (synctics << 3) + (cl_swsmoothsway ? (synctics << 2) : RANDOM_P2(8) * synctics)) & 2047;
// get height
xdiff = psp->sin_amt * bsinf(psp->sin_ndx, -14);