mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix crash when switch (un)deep number is 0
This commit is contained in:
parent
c3e4bbcb4b
commit
f66dc75400
|
@ -818,11 +818,11 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
if(Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
||||||
Freeze(Collision()->GetSwitchDelay(MapIndex));
|
Freeze(Collision()->GetSwitchDelay(MapIndex));
|
||||||
}
|
}
|
||||||
else if(Collision()->IsSwitch(MapIndex) == TILE_DFREEZE && Team() != TEAM_SUPER && Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
else if(Collision()->IsSwitch(MapIndex) == TILE_DFREEZE && Team() != TEAM_SUPER && (Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()]))
|
||||||
{
|
{
|
||||||
m_DeepFreeze = true;
|
m_DeepFreeze = true;
|
||||||
}
|
}
|
||||||
else if(Collision()->IsSwitch(MapIndex) == TILE_DUNFREEZE && Team() != TEAM_SUPER && Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
else if(Collision()->IsSwitch(MapIndex) == TILE_DUNFREEZE && Team() != TEAM_SUPER && (Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()]))
|
||||||
{
|
{
|
||||||
m_DeepFreeze = false;
|
m_DeepFreeze = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue