about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorTeetime <TeetimeTW@yahoo.de>2012-08-03 21:28:12 +0200
committerTeetime <TeetimeTW@yahoo.de>2012-08-03 21:28:12 +0200
commit47c55655ac8044e901e5ce3b3b34597982724f43 (patch)
tree1a0fb0742d9e43150c0276b52c1b01f1c665c7d1 /src/game
parent53b7b44d46c11557788791d8f5c1d76ad2c8e800 (diff)
downloadzcatch-47c55655ac8044e901e5ce3b3b34597982724f43.tar.gz
zcatch-47c55655ac8044e901e5ce3b3b34597982724f43.zip
Teamchat works now properly with caught and living players and those who are explicit in spectators
Diffstat (limited to 'src/game')
-rw-r--r--src/game/server/gamecontext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index 96d8364b..3967f49d 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -261,7 +261,8 @@ void CGameContext::SendChat(int ChatterClientID, int Team, const char *pText)
 		// send to the clients
 		for(int i = 0; i < MAX_CLIENTS; i++)
 		{
-			if(m_apPlayers[i] && m_apPlayers[i]->GetTeam() == Team)
+			//if(m_apPlayers[i] && m_apPlayers[i]->GetTeam() == Team)
+			if(m_apPlayers[i] && ChatterClientID >= 0 && ChatterClientID < MAX_CLIENTS && m_apPlayers[ChatterClientID] && m_apPlayers[ChatterClientID]->m_SpecExplicit == m_apPlayers[i]->m_SpecExplicit)
 				Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, i);
 		}
 	}