toggle for camera turnaround on timeover

This commit is contained in:
Alug committed 2025-01-12 02:52:04 +01:00
1 parent 86c89a47da
commit 1237b553f7
3 files changed
+11 -2

No files matched your search

+1
View File
@@ -148,6 +148,7 @@ extern consvar_t cv_cam_height[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_cam_rotate[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_cam_rotspeed[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS];
extern consvar_t cv_freecam_speed;
+9 -2
View File
@@ -3108,6 +3108,13 @@ consvar_t cv_cam_rotspeed[MAXSPLITSCREENPLAYERS] = {
{"cam4_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
};
consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS] = {
{"cam_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"cam2_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"cam3_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
{"cam4_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
};
static CV_PossibleValue_t freecam_speed_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_freecam_speed = {"freecam_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@@ -3815,8 +3822,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
const boolean vflip = (mo->eflags & MFE_VERTICALFLIP);
if (player->pflags & PF_TIMEOVER) // 1 for momentum keep, 2 for turnaround
timeover = (player->kartstuff[k_timeovercam] > 2*TICRATE ? 2 : 1);
if (cv_cam_timeover[num].value && (player->pflags & PF_TIMEOVER))
timeover = (player->kartstuff[k_timeovercam] > 2*TICRATE ? 2 : 1); // 1 for momentum keep, 2 for turnaround
else
timeover = 0;
+1
View File
@@ -1549,6 +1549,7 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_cam_speed[i]);
CV_RegisterVar(&cv_cam_rotate[i]);
CV_RegisterVar(&cv_cam_rotspeed[i]);
CV_RegisterVar(&cv_cam_timeover[i]);
}
CV_RegisterVar(&cv_freecam_speed);