mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix multiple redirected clients not dropped in the same tick
Closes #8551.
This commit is contained in:
parent
9143f2eac7
commit
350a57df60
|
@ -2971,14 +2971,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, "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;
|
||||
|
|
Loading…
Reference in a new issue