Fix: Don't reset doors for spectators

This commit is contained in:
def 2013-08-04 04:46:26 +02:00
parent a5f974bbe9
commit e4201940cd

View file

@ -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: // reset switches if we are the last player in team to prevent door opening cheat:
// https://github.com/DDRace/teeworlds/issues/190 // 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) { for (int i = 0; i < GameServer()->Collision()->m_NumSwitchers+1; ++i) {
GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()] = true; GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()] = true;
} }