From 4e608965ef2ceff44731cd3cbb585ccca6c6065d Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 25 Sep 2010 20:24:11 +0200 Subject: [PATCH] use a different name for connecting clients. Closes #192 --- src/engine/server/server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 54bef6fc4..37d5770a9 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -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; }