- SW: Allow disabling melee weapon blurring.

This commit is contained in:
Mitchell Richters 2020-09-15 16:27:03 +10:00 committed by Christoph Oelckers
parent b0090b07fc
commit 4370686c81
3 changed files with 42 additions and 8 deletions

View file

@ -81,6 +81,7 @@ CVARD(Bool, cl_swaltnukeinit, false, CVAR_ARCHIVE, "enable/disable SW alternativ
CVARD(Bool, cl_dukefixrpgrecoil, false, CVAR_ARCHIVE, "soften recoil of Duke 3D's RPG")
CVARD(Bool, cl_smoothsway, false, 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")
CUSTOM_CVARD(Int, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair")
{
if (self < 1) self = 1;

View file

@ -26,6 +26,7 @@ EXTERN_CVAR(Bool, cl_swaltnukeinit)
EXTERN_CVAR(Bool, cl_dukefixrpgrecoil)
EXTERN_CVAR(Bool, cl_smoothsway)
EXTERN_CVAR(Bool, cl_showmagamt)
EXTERN_CVAR(Bool, cl_nomeleeblur)
EXTERN_CVAR(Bool, demorec_seeds_cvar)
EXTERN_CVAR(Bool, demoplay_diffs)

View file

@ -1017,7 +1017,11 @@ pSwordSlide(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnSwordBlur(psp);
if (!cl_nomeleeblur)
{
SpawnSwordBlur(psp);
}
vel_adj = 24;
nx += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
@ -1043,7 +1047,11 @@ pSwordSlideDown(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnSwordBlur(psp);
if (!cl_nomeleeblur)
{
SpawnSwordBlur(psp);
}
vel_adj = 20;
vel = 2500;
@ -1102,7 +1110,11 @@ pSwordSlideR(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnSwordBlur(psp);
if (!cl_nomeleeblur)
{
SpawnSwordBlur(psp);
}
vel_adj = 24;
nx += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 1024 + 512)) / 64.;
@ -1128,7 +1140,11 @@ pSwordSlideDownR(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnSwordBlur(psp);
if (!cl_nomeleeblur)
{
SpawnSwordBlur(psp);
}
vel_adj = 24;
vel = 2500;
@ -6244,7 +6260,11 @@ pFistSlide(PANEL_SPRITEp psp)
//nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnFistBlur(psp);
if (!cl_nomeleeblur)
{
SpawnFistBlur(psp);
}
vel_adj = 68;
//nx += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang)) / 64.;
@ -6270,7 +6290,11 @@ pFistSlideDown(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnFistBlur(psp);
if (!cl_nomeleeblur)
{
SpawnFistBlur(psp);
}
vel_adj = 48;
vel = 3500;
@ -6363,7 +6387,11 @@ pFistSlideR(PANEL_SPRITEp psp)
//nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnFistBlur(psp);
if (!cl_nomeleeblur)
{
SpawnFistBlur(psp);
}
vel_adj = 68;
//nx += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang)) / 64.;
@ -6389,7 +6417,11 @@ pFistSlideDownR(PANEL_SPRITEp psp)
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
SpawnFistBlur(psp);
if (!cl_nomeleeblur)
{
SpawnFistBlur(psp);
}
vel_adj = 48;
vel = 3500;