about summary refs log tree commit diff
path: root/src/game/server/gamecontext.cpp
diff options
context:
space:
mode:
authorMarius "Teelevision" Neugebauer <marius@teele.eu>2014-04-08 03:05:30 +0200
committerMarius "Teelevision" Neugebauer <marius@teele.eu>2014-04-08 03:05:30 +0200
commit8f8b35f3d24184796181c332f13473dbbfb157f1 (patch)
tree7e7e7b2a6bfb6e4462a1fe277a6489824beb6122 /src/game/server/gamecontext.cpp
parent2e3107802663087eadd711eb43b09605080730be (diff)
downloadzcatch-8f8b35f3d24184796181c332f13473dbbfb157f1.tar.gz
zcatch-8f8b35f3d24184796181c332f13473dbbfb157f1.zip
added way to join spectators when caught
Diffstat (limited to 'src/game/server/gamecontext.cpp')
-rw-r--r--src/game/server/gamecontext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp
index 2374d5ff..e4c66cff 100644
--- a/src/game/server/gamecontext.cpp
+++ b/src/game/server/gamecontext.cpp
@@ -1093,8 +1093,9 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
 			}
 			else
 			{
-				char aBuf[256];
-				str_format(aBuf, sizeof(aBuf), "You will join automatically when \"%s\" dies.", Server()->ClientName(pPlayer->m_CaughtBy));
+				char aBuf[128];
+				pPlayer->m_zCatchJoinSpecWhenReleased = !pPlayer->m_zCatchJoinSpecWhenReleased;
+				str_format(aBuf, sizeof(aBuf), "You will join the %s when '%s' dies.", m_pController->GetTeamName(pPlayer->m_zCatchJoinSpecWhenReleased ? TEAM_SPECTATORS : TEAM_RED), Server()->ClientName(pPlayer->m_CaughtBy));
 				SendChatTarget(ClientID, aBuf);
 				return;
 			}