From d3fba6c3c7d48769fef209a4a58c53cb0ac5e8cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Tue, 9 Jul 2024 17:46:42 +0200 Subject: [PATCH] Fix multiple redirected clients not dropped in the same tick Closes #8551. (cherry picked from commit 350a57df60fef4c19eeb27e752730ad59085234d) --- src/engine/server/server.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index da55d508e..c65f51f5d 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -3219,14 +3219,21 @@ int CServer::Run() if(!NonActive) PumpNetwork(PacketWaiting); - NonActive = true; - for(int i = 0; i < MAX_CLIENTS; ++i) { if(m_aClients[i].m_State == CClient::STATE_REDIRECTED) + { if(time_get() > m_aClients[i].m_RedirectDropTime) + { m_NetServer.Drop(i, EClientDropType::Redirected, "redirected"); - if(m_aClients[i].m_State != CClient::STATE_EMPTY) + } + } + } + + NonActive = true; + for(const auto &Client : m_aClients) + { + if(Client.m_State != CClient::STATE_EMPTY) { NonActive = false; break;