mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix: Reset switches when team is locked
This commit is contained in:
parent
f08f143fe7
commit
da2cdf7acd
|
@ -810,7 +810,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 || Teams()->TeamLocked(Team())) && 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;
|
||||
GameServer()->Collision()->m_pSwitchers[i].m_EndTick[Team()] = 0;
|
||||
|
|
Loading…
Reference in a new issue