From c5df256d9e254633fee46e90b7cf85c82210fc91 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 29 Jan 2020 20:40:24 -0800 Subject: [PATCH] Make fucking with the window optional --- src/p_local.h | 1 + src/p_tick.c | 3 ++- src/p_user.c | 1 + src/r_main.c | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_local.h b/src/p_local.h index 486198ee5..db422e58d 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -136,6 +136,7 @@ extern consvar_t cv_inverseslope; extern consvar_t cv_slopeview; extern consvar_t cv_quaketilt; extern consvar_t cv_actionmovie; +extern consvar_t cv_windowquake; extern fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS], t_cam_height[MAXSPLITSCREENPLAYERS], t_cam_rotate[MAXSPLITSCREENPLAYERS]; diff --git a/src/p_tick.c b/src/p_tick.c index 75e5a6bef..cb3d9ccbb 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -633,7 +633,8 @@ void P_Ticker(boolean run) quake.x = M_RandomRange(-ir,ir); quake.y = M_RandomRange(-ir,ir); quake.z = M_RandomRange(-ir,ir); - I_CursedWindowMovement(FixedInt(quake.x), FixedInt(quake.y)); + if (cv_windowquake.value) + I_CursedWindowMovement(FixedInt(quake.x), FixedInt(quake.y)); ir >>= 2; ir = M_RandomRange(-ir,ir); if (ir < 0) diff --git a/src/p_user.c b/src/p_user.c index 5b510ea08..99ba14192 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2736,6 +2736,7 @@ static CV_PossibleValue_t slopeview_cons_t[] = consvar_t cv_slopeview = {"slopeview", "On", CV_SAVE, slopeview_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_quaketilt = {"quaketilt", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_actionmovie = {"actionmovie", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_windowquake = {"windowquake", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42}; fixed_t t_cam_height[MAXSPLITSCREENPLAYERS] = {-42,-42,-42,-42}; diff --git a/src/r_main.c b/src/r_main.c index cfc520f92..6b253a958 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1711,6 +1711,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_slopeview); CV_RegisterVar(&cv_quaketilt); CV_RegisterVar(&cv_actionmovie); + CV_RegisterVar(&cv_windowquake); CV_RegisterVar(&cv_showhud); CV_RegisterVar(&cv_translucenthud);