From 918b4a88347d5b5e886aab3d40f907ce5456168e Mon Sep 17 00:00:00 2001 From: Boondorl Date: Tue, 11 Mar 2025 09:19:57 -0400 Subject: [PATCH] Fixed clients after host not getting quitters --- src/d_net.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index 438bb3d0aa..689f90848e 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -1410,19 +1410,20 @@ void NetUpdate(int tics) ticLoops = 1; const int maxPlayerLoops = isSelf ? 1 : playerLoops; + int totalQuits = quitters; for (int tLoops = 0, curTicOfs = 0; tLoops < ticLoops; ++tLoops, curTicOfs += maxCommands) { for (int pLoops = 0, curPlayerOfs = 0; pLoops < maxPlayerLoops; ++pLoops, curPlayerOfs += MaxPlayersPerPacket) { size_t size = 10; - if (quitters > 0) + if (totalQuits > 0) { NetBuffer[0] |= NCMD_QUITTERS; - NetBuffer[size++] = quitters; - for (int i = 0; i < quitters; ++i) + NetBuffer[size++] = totalQuits; + for (int i = 0; i < totalQuits; ++i) NetBuffer[size++] = quitNums[i]; - quitters = 0; + totalQuits = 0; } else {