mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1953
1953: Fix crash when switch (un)deep number is 0 r=def- a=12pm Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
This commit is contained in:
commit
45cfebc5e6
|
@ -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