give camera lookback a toggle + extra option
This commit is contained in:
1 parent
594931e07e
commit
783ce7bada
3 files changed
+11
-3
No files matched your search
@@ -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
@@ -3073,6 +3073,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;
|
||||
@@ -3891,10 +3894,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);
|
||||
|
||||
@@ -1959,6 +1959,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);
|
||||
|
||||
Reference in new issue
Block a user