give camera lookback a toggle + extra option

This commit is contained in:
Alug committed 2024-08-31 18:45:29 +02:00
1 parent 2e80a9ffe9
commit 04b76339cb
3 files changed
+11 -3

No files matched your search

+2
View File
@@ -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;
+7 -3
View File
@@ -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);
+2
View File
@@ -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);