From 8ed52a3a9de7577e2751e42d0e94edf6b9efca03 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sun, 9 Mar 2025 11:07:49 -0400 Subject: [PATCH] G_Ticker fixes from RR https://git.do.srb2.org/KartKrew/RingRacers/-/commit/ab0094b8d0b72d651cfefe9847a367fcf1a0ebcc https://git.do.srb2.org/KartKrew/RingRacers/-/commit/95216563a6980576d31f219eb770adc72c134a9d --- src/d_clisrv.c | 15 ++++++++++++++- src/g_game.c | 2 +- src/p_tick.c | 7 ------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 01a81cfbd..c9edef5c3 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -57,6 +57,7 @@ #include "k_boss.h" #include "doomstat.h" #include "s_sound.h" // sfx_syfail +#include "r_fps.h" // cl loading screen #include "v_video.h" @@ -5598,6 +5599,8 @@ boolean TryRunTics(tic_t realtics) } else { + boolean tickInterp = true; + // run the count * tics while (neededtic > gametic) { @@ -5625,7 +5628,17 @@ boolean TryRunTics(tic_t realtics) P_PostLoadLevel(); } - G_Ticker((gametic % NEWTICRATERATIO) == 0); + boolean run = (gametic % NEWTICRATERATIO) == 0; + + if (run && tickInterp) + { + // Update old view state BEFORE ticking so resetting + // the old interpolation state from game logic works. + R_UpdateViewInterpolation(); + tickInterp = false; // do not update again in sped-up tics + } + + G_Ticker(run); } if (Playing() && netgame && (gametic % TICRATE == 0)) diff --git a/src/g_game.c b/src/g_game.c index 24ae2be76..330719adb 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2071,7 +2071,7 @@ void G_Ticker(boolean run) } } - D_MapChange(gamemap, gametype, (cv_kartencore.value == 1), false, 1, false, false); + D_MapChange(gamemap, gametype, encoremode, false, 1, false, false); } for (i = 0; i < MAXPLAYERS; i++) diff --git a/src/p_tick.c b/src/p_tick.c index 862956742..4962fada9 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -665,13 +665,6 @@ void P_Ticker(boolean run) players[i].jointime++; } - if (run) - { - // Update old view state BEFORE ticking so resetting - // the old interpolation state from game logic works. - R_UpdateViewInterpolation(); - } - if (objectplacing) { if (OP_FreezeObjectplace())