From 176657fe543ac61d1bbd0d442baf60b437685fe0 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 b97a11cda..486198ee5 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -135,6 +135,7 @@ extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS], cv_cam_rotate[MAXSPLITSCRE extern consvar_t cv_inverseslope; extern consvar_t cv_slopeview; extern consvar_t cv_quaketilt; +extern consvar_t cv_actionmovie; extern fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS], t_cam_height[MAXSPLITSCREENPLAYERS], t_cam_rotate[MAXSPLITSCREENPLAYERS]; diff --git a/src/p_user.c b/src/p_user.c index c0f2a2ea0..cd0545e62 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2735,6 +2735,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[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 a7e4f8de2..cfc520f92 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -639,7 +639,7 @@ void R_CheckViewMorph(int s) float fisheyemap[MAXVIDWIDTH/2 + 1]; #endif - angle_t rollangle = players[displayplayers[s]].viewrollangle + quake.roll; + angle_t rollangle = players[displayplayers[s]].viewrollangle; #ifdef WOUGHMP_WOUGHMP fixed_t fisheye = cv_cam2_turnmultiplier.value; // temporary test value #endif @@ -649,6 +649,9 @@ void R_CheckViewMorph(int s) v->zoomneeded = FRACUNIT; } + 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. @@ -1707,6 +1710,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);