mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
set m_Authed on map change Closed #93.
initialized m_Addr because i seem to have forgotten
This commit is contained in:
parent
663858ea8a
commit
6d1ec0dd62
|
@ -555,6 +555,7 @@ int CServer::NewClientCallback(int ClientId, void *pUser)
|
||||||
pThis->m_aClients[ClientId].m_aClan[0] = 0;
|
pThis->m_aClients[ClientId].m_aClan[0] = 0;
|
||||||
pThis->m_aClients[ClientId].m_Authed = 0;
|
pThis->m_aClients[ClientId].m_Authed = 0;
|
||||||
pThis->m_aClients[ClientId].m_AuthTries = 0;
|
pThis->m_aClients[ClientId].m_AuthTries = 0;
|
||||||
|
memset(&pThis->m_aClients[ClientId].m_Addr, 0, sizeof(NETADDR));
|
||||||
pThis->m_aClients[ClientId].Reset();
|
pThis->m_aClients[ClientId].Reset();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -581,6 +582,7 @@ int CServer::DelClientCallback(int ClientId, const char *pReason, void *pUser)
|
||||||
pThis->m_aClients[ClientId].m_aClan[0] = 0;
|
pThis->m_aClients[ClientId].m_aClan[0] = 0;
|
||||||
pThis->m_aClients[ClientId].m_Authed = 0;
|
pThis->m_aClients[ClientId].m_Authed = 0;
|
||||||
pThis->m_aClients[ClientId].m_AuthTries = 0;
|
pThis->m_aClients[ClientId].m_AuthTries = 0;
|
||||||
|
memset(&pThis->m_aClients[ClientId].m_Addr, 0, sizeof(NETADDR));
|
||||||
pThis->m_aClients[ClientId].m_Snapshots.PurgeAll();
|
pThis->m_aClients[ClientId].m_Snapshots.PurgeAll();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -738,6 +740,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
||||||
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf);
|
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf);
|
||||||
m_aClients[ClientId].m_State = CClient::STATE_READY;
|
m_aClients[ClientId].m_State = CClient::STATE_READY;
|
||||||
GameServer()->OnClientConnected(ClientId);
|
GameServer()->OnClientConnected(ClientId);
|
||||||
|
GameServer()->OnSetAuthed(ClientId, m_aClients[ClientId].m_Authed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(Msg == NETMSG_ENTERGAME)
|
else if(Msg == NETMSG_ENTERGAME)
|
||||||
|
|
Loading…
Reference in a new issue