mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
use a different name for connecting clients. Closes #192
This commit is contained in:
parent
feb7e60bb2
commit
4e608965ef
|
@ -342,8 +342,10 @@ int *CServer::LatestInput(int ClientId, int *size)
|
|||
|
||||
const char *CServer::ClientName(int ClientId)
|
||||
{
|
||||
if(ClientId < 0 || ClientId >= MAX_CLIENTS || m_aClients[ClientId].m_State < CServer::CClient::STATE_READY)
|
||||
if(ClientId < 0 || ClientId >= MAX_CLIENTS || m_aClients[ClientId].m_State == CServer::CClient::STATE_EMPTY)
|
||||
return "(invalid client)";
|
||||
else if(m_aClients[ClientId].m_State < CServer::CClient::STATE_READY)
|
||||
return "(connecting client)";
|
||||
return m_aClients[ClientId].m_aName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue