From 343b12e5efe3a51c1a6963ff38b5adf06b245cc1 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 1 Nov 2025 16:32:04 +0100 Subject: [PATCH] make a toggle for using angleturn in replays while this is more accurate to how the player experienced stuff in the actual game, this also can be somewhat jittery and stuttery depending on the net conditions the replay was recorded in, so make this toggable if someone wants it --- src/d_netcmd.c | 5 +++++ src/d_netcmd.h | 2 ++ src/p_user.c | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 9e9fa8fa0..6d90e4d4e 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -292,6 +292,10 @@ consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, // Lagless camera! Yay! consvar_t cv_laglesscam = {"lagless_camera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +// makes the camera use the saved angleturn in replays instead of the players angle +// more accurate to how the recording player seen things in game, but may be jittery if they encountered net issues +consvar_t cv_demoangturn = {"useangleturninreplays", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; + consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS] = { {"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}, {"verticallook2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}, @@ -1046,6 +1050,7 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_betainterscreen); CV_RegisterVar(&cv_laglesscam); + CV_RegisterVar(&cv_demoangturn); for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) { diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 52f777e2b..6b7382403 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -209,6 +209,8 @@ extern consvar_t cv_betainterscreen; extern consvar_t cv_laglesscam; +extern consvar_t cv_demoangturn; + typedef enum { SKINMENUTYPE_SCROLL = 0, diff --git a/src/p_user.c b/src/p_user.c index b99998844..5ccc43f0a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3824,7 +3824,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall // Hack-adjacent. // Sometimes stale ticcmds send a weird angle at the start of the race. // P_UpdatePlayerAngle knows to ignore cmd angle when you literally can't turn, so we do the same here. - if (leveltime > starttime) + if (cv_demoangturn.value && leveltime > starttime) focusangle = player->cmd.angleturn << 16; else focusangle = mo->angle; // Just use something known sane.