Fix multiple redirected clients not dropped in the same tick

Closes #8551.
This commit is contained in:
Robert Müller 2024-07-09 17:46:42 +02:00
parent 9143f2eac7
commit 350a57df60

View file

@ -2971,14 +2971,21 @@ int CServer::Run()
if(!NonActive) if(!NonActive)
PumpNetwork(PacketWaiting); PumpNetwork(PacketWaiting);
NonActive = true;
for(int i = 0; i < MAX_CLIENTS; ++i) for(int i = 0; i < MAX_CLIENTS; ++i)
{ {
if(m_aClients[i].m_State == CClient::STATE_REDIRECTED) if(m_aClients[i].m_State == CClient::STATE_REDIRECTED)
{
if(time_get() > m_aClients[i].m_RedirectDropTime) if(time_get() > m_aClients[i].m_RedirectDropTime)
{
m_NetServer.Drop(i, "redirected"); m_NetServer.Drop(i, "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; NonActive = false;
break; break;