Switches can be set with number 0 (even if they don't make much sense, fixes #265)

This commit is contained in:
def 2015-08-22 20:41:46 +02:00
parent c033ad6828
commit fabe25dd45

View file

@ -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;