From e4201940cd38ec8fe3a924c7024e48727816d695 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 4 Aug 2013 04:46:26 +0200 Subject: [PATCH] Fix: Don't reset doors for spectators --- src/game/server/entities/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index ce2fc9baf..393f57b89 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -788,7 +788,7 @@ void CCharacter::Die(int Killer, int Weapon) // reset switches if we are the last player in team to prevent door opening cheat: // https://github.com/DDRace/teeworlds/issues/190 - if (Team() != TEAM_FLOCK && Team() != TEAM_SUPER && Teams()->Count(Team()) == 1 && GameServer()->Collision()->m_NumSwitchers > 0) { + if (Team() > TEAM_FLOCK && Team() < TEAM_SUPER && Teams()->Count(Team()) == 1 && GameServer()->Collision()->m_NumSwitchers > 0) { for (int i = 0; i < GameServer()->Collision()->m_NumSwitchers+1; ++i) { GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()] = true; }