From 9b6034853fca9b6b3e86dc821e2ce75ddfd91615 Mon Sep 17 00:00:00 2001 From: Indev Date: Thu, 28 Nov 2024 22:24:51 +0300 Subject: [PATCH] Simplify consistency check a bit --- src/d_clisrv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 722e81d6c..839e2b97c 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5399,11 +5399,10 @@ static void HandlePacketFromPlayer(SINT8 node) } // Check player consistancy during the level - if (((!can_receive_gamestate[node]) && realstart <= gametic && realstart > gametic - TICQUEUE+1 && gamestate == GS_LEVEL - && consistancy[realstart%TICQUEUE] != SHORT(netbuffer->u.clientpak.consistancy)) || (can_receive_gamestate[node] && realstart <= gametic && realstart + TICQUEUE - 1 > gametic && gamestate == GS_LEVEL + if (gamestate == GS_LEVEL + && (realstart > gametic - TICQUEUE+1 && realstart <= gametic) && consistancy[realstart%TICQUEUE] != SHORT(netbuffer->u.clientpak.consistancy) - && !resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime() - && !SV_ResendingSavegameToAnyone())) + && (!can_receive_gamestate[node] || (!resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime() && !SV_ResendingSavegameToAnyone()))) { //#ifndef SATURNPAK // lug: keep this behaviour for v7.1 atleast // we need to send this so the client can tell us if it can receive the savegame