use a different name for connecting clients. Closes #192

This commit is contained in:
oy 2010-09-25 20:24:11 +02:00
parent feb7e60bb2
commit 4e608965ef

View file

@ -342,8 +342,10 @@ int *CServer::LatestInput(int ClientId, int *size)
const char *CServer::ClientName(int ClientId) 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)"; return "(invalid client)";
else if(m_aClients[ClientId].m_State < CServer::CClient::STATE_READY)
return "(connecting client)";
return m_aClients[ClientId].m_aName; return m_aClients[ClientId].m_aName;
} }