From 27433f6fb5ebbb27cca1528db908e78e63ebea71 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 21 Oct 2025 19:26:01 +0200 Subject: [PATCH] call R_SetupFreelook in R_ExecuteSetViewSize to instantly update our now stale yslope pointer! fixes random crashes when switching numbers of splitviews in replays --- src/r_fps.cpp | 2 +- src/r_fps.h | 1 + src/r_main.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/r_fps.cpp b/src/r_fps.cpp index ad8c97aed..98bfaf68b 100644 --- a/src/r_fps.cpp +++ b/src/r_fps.cpp @@ -172,7 +172,7 @@ static vector3_t *R_LerpVector3(const vector3_t *from, const vector3_t *to, fixe // recalc necessary stuff for mouseaiming // slopes are already calculated for the full possible view (which is 4*viewheight). // 18/08/18: (No it's actually 16*viewheight, thanks Lactozilla for finding this out) -static void R_SetupFreelook(void) +void R_SetupFreelook(void) { // clip it in the case we are looking a hardware 90 degrees full aiming // (lmps, network and use F12...) diff --git a/src/r_fps.h b/src/r_fps.h index 49ca669d3..7ad5e9f16 100644 --- a/src/r_fps.h +++ b/src/r_fps.h @@ -151,6 +151,7 @@ typedef struct levelinterpolator_s { }; } levelinterpolator_t; +void R_SetupFreelook(void); // Interpolates the current view variables (r_state.h) against the selected view context in R_SetViewContext void R_InterpolateView(fixed_t frac, boolean forceinvalid); // Special function just for software diff --git a/src/r_main.cpp b/src/r_main.cpp index 33569fe80..a340ef29c 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -960,6 +960,8 @@ void R_ExecuteSetViewSize(void) } } + R_SetupFreelook(); + am_recalc = true; }