mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Switches can be set with number 0 (even if they don't make much sense, fixes #265)
This commit is contained in:
parent
c033ad6828
commit
fabe25dd45
|
@ -1435,20 +1435,8 @@ void CLayerSwitch::BrushDraw(CLayer *pBrush, float wx, float wy)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(!m_pEditor->m_SwitchNum)
|
||||
{
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Number = 0;
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Type = 0;
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Flags = 0;
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Delay = 0;
|
||||
m_pTiles[fy*m_Width+fx].m_Index = 0;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Number = m_pEditor->m_SwitchNum;
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Delay = m_pEditor->m_SwitchDelay;
|
||||
}
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Number = m_pEditor->m_SwitchNum;
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Delay = m_pEditor->m_SwitchDelay;
|
||||
}
|
||||
|
||||
m_pSwitchTile[fy*m_Width+fx].m_Type = l->m_pTiles[y*l->m_Width+x].m_Index;
|
||||
|
|
Loading…
Reference in a new issue