Merge pull request #7997 from heinrich5991/pr_ddnet_client_empty

`ClientEmpty` → `ClientSlotEmpty`
This commit is contained in:
Robert Müller 2024-02-19 20:54:05 +00:00 committed by GitHub
commit 259ed751ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -55,7 +55,7 @@ public:
virtual const char *ClientName(int ClientID) const = 0;
virtual const char *ClientClan(int ClientID) const = 0;
virtual int ClientCountry(int ClientID) const = 0;
virtual bool ClientEmpty(int ClientID) const = 0;
virtual bool ClientSlotEmpty(int ClientID) const = 0;
virtual bool ClientIngame(int ClientID) const = 0;
virtual bool ClientAuthed(int ClientID) const = 0;
virtual bool GetClientInfo(int ClientID, CClientInfo *pInfo) const = 0;

View file

@ -646,7 +646,7 @@ int CServer::ClientCountry(int ClientID) const
return -1;
}
bool CServer::ClientEmpty(int ClientID) const
bool CServer::ClientSlotEmpty(int ClientID) const
{
return ClientID >= 0 && ClientID < MAX_CLIENTS && m_aClients[ClientID].m_State == CServer::CClient::STATE_EMPTY;
}

View file

@ -298,7 +298,7 @@ public:
const char *ClientName(int ClientID) const override;
const char *ClientClan(int ClientID) const override;
int ClientCountry(int ClientID) const override;
bool ClientEmpty(int ClientID) const override;
bool ClientSlotEmpty(int ClientID) const override;
bool ClientIngame(int ClientID) const override;
bool ClientAuthed(int ClientID) const override;
int Port() const override;

View file

@ -1521,7 +1521,7 @@ void CGameContext::OnClientEnter(int ClientID)
int Empty = -1;
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(Server()->ClientEmpty(i))
if(Server()->ClientSlotEmpty(i))
{
Empty = i;
break;