From 96808a11451f2ccf22346253bd22f8f559207ac8 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 20 Mar 2011 15:33:49 +0100 Subject: made it possible to just show the number of player slots of a server (instead of client ones). Closes #68 --- src/game/server/gamecontext.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/game/server/gamecontext.cpp') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 348b6735..1612ebec 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1184,6 +1184,11 @@ bool CGameContext::IsClientReady(int ClientID) return m_apPlayers[ClientID] && m_apPlayers[ClientID]->m_IsReady ? true : false; } +bool CGameContext::IsClientPlayer(int ClientID) +{ + return m_apPlayers[ClientID] && m_apPlayers[ClientID]->GetTeam() == TEAM_SPECTATORS ? false : true; +} + const char *CGameContext::GameType() { return m_pController && m_pController->m_pGameType ? m_pController->m_pGameType : ""; } const char *CGameContext::Version() { return GAME_VERSION; } const char *CGameContext::NetVersion() { return GAME_NETVERSION; } -- cgit 1.4.1