about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/gamecontext.cpp5
-rw-r--r--src/game/server/gamecontext.h1
2 files changed, 6 insertions, 0 deletions
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; }
diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h
index f64232a1..7379b74d 100644
--- a/src/game/server/gamecontext.h
+++ b/src/game/server/gamecontext.h
@@ -162,6 +162,7 @@ public:
 	virtual void OnClientPredictedInput(int ClientID, void *pInput);
 
 	virtual bool IsClientReady(int ClientID);
+	virtual bool IsClientPlayer(int ClientID);
 
 	virtual const char *GameType();
 	virtual const char *Version();