Bring back cv_quaketilt, add cv_tiltsmoothing to adjust the smoothening

This commit is contained in:
James R committed 2020-09-28 13:39:24 -07:00
1 parent 5d12696a70
commit ae77792df3
3 files changed
+11 -2

No files matched your search

+2
View File
@@ -137,6 +137,8 @@ extern consvar_t cv_cam4_dist, cv_cam4_still, cv_cam4_height;
extern consvar_t cv_cam4_speed, cv_cam4_rotate, cv_cam4_rotspeed;
extern consvar_t cv_tilting;
extern consvar_t cv_quaketilt;
extern consvar_t cv_tiltsmoothing;
extern consvar_t cv_actionmovie;
extern consvar_t cv_windowquake;
+7 -2
View File
@@ -7109,6 +7109,8 @@ consvar_t cv_cam4_rotate = {"cam4_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate,
consvar_t cv_cam4_rotspeed = {"cam4_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_tilting = {"tilting", "On", CV_SAVE, CV_OnOff, 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_tiltsmoothing = {"tiltsmoothing", "32", CV_SAVE, CV_Natural, 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};
@@ -8301,9 +8303,12 @@ DoABarrelRoll (player_t *player)
slope = 0;
}
slope -= Quaketilt(player);
if (cv_quaketilt.value)
{
slope -= Quaketilt(player);
}
delta = (INT32)( slope - player->tilt )/ 32;
delta = (INT32)( slope - player->tilt )/ cv_tiltsmoothing.value;
if (delta)
player->tilt += delta;
+2
View File
@@ -1844,6 +1844,8 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_cam4_rotspeed);
CV_RegisterVar(&cv_tilting);
CV_RegisterVar(&cv_quaketilt);
CV_RegisterVar(&cv_tiltsmoothing);
CV_RegisterVar(&cv_actionmovie);
CV_RegisterVar(&cv_windowquake);