mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Another go at the door opening bug
This commit is contained in:
parent
86d9d75e2d
commit
37badd724b
|
@ -808,9 +808,8 @@ void CCharacter::Die(int Killer, int Weapon)
|
|||
Msg.m_ModeSpecial = ModeSpecial;
|
||||
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, -1);
|
||||
|
||||
// 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 || Teams()->TeamLocked(Team())) && GameServer()->Collision()->m_NumSwitchers > 0) {
|
||||
// reset switches if we are the last player in team to prevent door opening cheat
|
||||
if (Team() > TEAM_FLOCK && Team() < TEAM_SUPER && (Teams()->Count(Team()) < 2 || 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