From 319cef25dababa7d70774e8dd82bab733b5252ec Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 26 Jan 2020 21:10:24 -0800 Subject: [PATCH] Make rolling quake optional --- src/p_local.h | 1 + src/p_user.c | 1 + src/r_main.c | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/p_local.h b/src/p_local.h index 4c2789a46..ee5c7ea95 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -138,6 +138,7 @@ extern consvar_t cv_cam4_speed, cv_cam4_rotate, cv_cam4_rotspeed; extern consvar_t cv_slopeview; extern consvar_t cv_quaketilt; +extern consvar_t cv_actionmovie; extern fixed_t t_cam_dist, t_cam_height, t_cam_rotate; extern fixed_t t_cam2_dist, t_cam2_height, t_cam2_rotate; diff --git a/src/p_user.c b/src/p_user.c index 3733f7e49..e9c8dc928 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -7118,6 +7118,7 @@ static CV_PossibleValue_t slopeview_cons_t[] = }; consvar_t cv_slopeview = {"slopeview", "Off", 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}; fixed_t t_cam_dist = -42; fixed_t t_cam_height = -42; diff --git a/src/r_main.c b/src/r_main.c index fca595a28..1e664a408 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -666,11 +666,14 @@ void R_CheckViewMorph(void) float fisheyemap[MAXVIDWIDTH/2 + 1]; #endif - angle_t rollangle = players[displayplayers[0]].viewrollangle + quake.roll; + angle_t rollangle = players[displayplayers[0]].viewrollangle; #ifdef WOUGHMP_WOUGHMP fixed_t fisheye = cv_cam2_turnmultiplier.value; // temporary test value #endif + if (cv_actionmovie.value) + rollangle += quake.roll; + rollangle >>= ANGLETOFINESHIFT; rollangle = ((rollangle+2) & ~3) & FINEMASK; // Limit the distinct number of angles to reduce recalcs from angles changing a lot. @@ -1845,6 +1848,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_slopeview); CV_RegisterVar(&cv_quaketilt); + CV_RegisterVar(&cv_actionmovie); CV_RegisterVar(&cv_showhud); CV_RegisterVar(&cv_translucenthud);