From 1eabec187a96ec10bade0dbc58db93f635967b18 Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Sun, 7 Sep 2025 01:46:27 +0200 Subject: [PATCH] Fix gamestate reloads --- src/d_clisrv.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 31f298f6f..ba5d2ec4b 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5741,6 +5741,17 @@ boolean TryRunTics(tic_t realtics) COM_BufTicker(); if (mapchangepending) D_MapChange(-1, 0, encoremode, false, 2, false, fromlevelselect); // finish the map change + + // fun fact: this used to be located in NetUpdate! + // as it turns out, reloading the level in rendering code is a very bad idea! + if (client) + { + // If the client just finished redownloading the game state, load it + if (cl_redownloadinggamestate && fileneeded[0].status == FS_FOUND) + CL_ReloadReceivedSavegame(); + + hu_redownloadinggamestate = cl_redownloadinggamestate; + } } NetUpdate(); @@ -6184,12 +6195,7 @@ void NetUpdate(void) if (client) { - // If the client just finished redownloading the game state, load it - if (cl_redownloadinggamestate && fileneeded[0].status == FS_FOUND) - CL_ReloadReceivedSavegame(); - CL_SendClientCmd(); // Send tic cmd - hu_redownloadinggamestate = cl_redownloadinggamestate; } else {