mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Don't try to reset doors when there are none
This commit is contained in:
parent
6105f60a89
commit
7bf704a6ed
|
@ -784,8 +784,8 @@ 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 (Teams()->Count(Team()) == 1) {
|
||||
for (int i = 0; i <= GameServer()->Collision()->m_NumSwitchers; ++i) {
|
||||
if (Teams()->Count(Team()) == 1 && GameServer()->Collision()->m_pSwitchers) {
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue