From f9288eb5b15d3ed1dba4856e4a70a55f899c00a0 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 28 Mar 2011 23:45:47 +0200 Subject: fixed that spectators go to free view if the followed player joins spectators and prevent that you can follow spectators --- src/game/server/gamecontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/server/gamecontext.cpp') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index d008787a..a50a7ef3 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -803,7 +803,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) return; pPlayer->m_LastSetSpectatorMode = Server()->Tick(); - if(pMsg->m_SpectatorID != SPEC_FREEVIEW && !m_apPlayers[pMsg->m_SpectatorID]) + if(pMsg->m_SpectatorID != SPEC_FREEVIEW && (!m_apPlayers[pMsg->m_SpectatorID] || m_apPlayers[pMsg->m_SpectatorID]->GetTeam() == TEAM_SPECTATORS)) SendChatTarget(ClientID, "Invalid spectator id used"); else pPlayer->m_SpectatorID = pMsg->m_SpectatorID; -- cgit 1.4.1