mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +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)
|
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;
|
||||||
|
|
Loading…
Reference in a new issue