add toggle for quake screenshake effects

TODO: make an accessability option menu for certain effects
This commit is contained in:
Alug committed 2025-07-24 16:39:06 +02:00
1 parent 3b7d517be2
commit 76e54762d8
4 files changed
+9 -3

No files matched your search

+2
View File
@@ -158,6 +158,8 @@ extern consvar_t cv_tiltsmoothing;
extern consvar_t cv_actionmovie;
extern consvar_t cv_screenquake;
extern consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS];
+3 -3
View File
@@ -573,7 +573,7 @@ static void P_RunQuakes(void)
{
fixed_t ir;
if (quake.time <= 0)
if (!cv_screenquake.value || quake.time <= 0)
{
quake.x = quake.y = quake.z = quake.roll = 0;
return;
@@ -618,8 +618,8 @@ static inline void P_ResetSpriteStuff(void)
if (!mo || (mo->sprite == SPR_NULL) || (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
continue;
mo->spritexscale = mo->realxscale;
mo->spriteyscale = mo->realyscale;
mo->spritexscale = mo->realxscale;
mo->spriteyscale = mo->realyscale;
mo->spritexoffset = mo->realxoffset;
mo->spriteyoffset = mo->realyoffset;
}
+2
View File
@@ -3044,6 +3044,8 @@ consvar_t cv_tiltsmoothing = {"tiltsmoothing", "32", CV_SAVE, CV_Natural, NULL,
consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_screenquake = {"quakescreenshake", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS] = {
+2
View File
@@ -1550,6 +1550,8 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_tiltsmoothing);
CV_RegisterVar(&cv_actionmovie);
CV_RegisterVar(&cv_screenquake);
CV_RegisterVar(&cv_driftsparkpulse);
CV_RegisterVar(&cv_gravstretch);
CV_RegisterVar(&cv_sloperoll);