diff --git a/src/p_local.h b/src/p_local.h index 6091abac4..0193ec09d 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -144,6 +144,8 @@ extern consvar_t cv_tiltsmoothing; extern consvar_t cv_actionmovie; +extern consvar_t cv_lookbackmom; + extern fixed_t t_cam_dist, t_cam_height, t_cam_rotate; extern fixed_t t_cam2_dist, t_cam2_height, t_cam2_rotate; extern fixed_t t_cam3_dist, t_cam3_height, t_cam3_rotate; diff --git a/src/p_user.c b/src/p_user.c index 81d054e95..26f7c7193 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3060,6 +3060,9 @@ 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}; +static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Extra Momentum"}, {0, NULL}}; +consvar_t cv_lookbackmom = {"cameralookbackmom", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; + fixed_t t_cam_dist = -42; fixed_t t_cam_height = -42; fixed_t t_cam_rotate = -42; @@ -3878,10 +3881,11 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall // when looking back, camera's momentum // should inherit the momentum of the player - if (lookback && lookbackdelay[num]) + // if value is 2, add extra + if (cv_lookbackmom.value && lookback && lookbackdelay[num]) { - thiscam->momx += mo->momx; - thiscam->momy += mo->momy; + thiscam->momx += cv_lookbackmom.value*mo->momx; + thiscam->momy += cv_lookbackmom.value*mo->momy; } thiscam->momz = FixedMul(z - thiscam->z, camspeed/2); diff --git a/src/r_main.c b/src/r_main.c index 784882330..8ea5bdd7d 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1958,6 +1958,8 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_tiltsmoothing); CV_RegisterVar(&cv_actionmovie); + CV_RegisterVar(&cv_lookbackmom); + CV_RegisterVar(&cv_driftsparkpulse); CV_RegisterVar(&cv_gravstretch); CV_RegisterVar(&cv_sloperoll);