diff --git a/src/game/editor/layer_tiles.cpp b/src/game/editor/layer_tiles.cpp index 0ffdb2dc8..7dc895c6c 100644 --- a/src/game/editor/layer_tiles.cpp +++ b/src/game/editor/layer_tiles.cpp @@ -419,7 +419,7 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) CLayerTiles *pLt = static_cast(pBrush); - bool Destructive = m_pEditor->m_BrushDrawDestructive || IsEmpty(pLt); + bool Destructive = m_pEditor->m_BrushDrawDestructive || Empty || IsEmpty(pLt); for(int y = 0; y < h; y++) { @@ -432,7 +432,7 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) continue; bool HasTile = GetTile(fx, fy).m_Index; - if(pLt->GetTile(x, y).m_Index == TILE_THROUGH_CUT) + if(!Empty && pLt->GetTile(x, y).m_Index == TILE_THROUGH_CUT) { if(m_Game && m_pEditor->m_Map.m_pFrontLayer) { @@ -448,7 +448,7 @@ void CLayerTiles::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) continue; if(Empty) - m_pTiles[fy*m_Width+fx].m_Index = 1; + m_pTiles[fy*m_Width+fx].m_Index = 0; else SetTile(fx, fy, pLt->m_pTiles[(y*pLt->m_Width + x%pLt->m_Width) % (pLt->m_Width*pLt->m_Height)]); } @@ -1212,7 +1212,7 @@ void CLayerTele::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) CLayerTele *pLt = static_cast(pBrush); - bool Destructive = m_pEditor->m_BrushDrawDestructive || IsEmpty(pLt); + bool Destructive = m_pEditor->m_BrushDrawDestructive || Empty || IsEmpty(pLt); for(int y = 0; y < h; y++) { @@ -1499,7 +1499,7 @@ void CLayerSpeedup::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) CLayerSpeedup *pLt = static_cast(pBrush); - bool Destructive = m_pEditor->m_BrushDrawDestructive || IsEmpty(pLt); + bool Destructive = m_pEditor->m_BrushDrawDestructive || Empty || IsEmpty(pLt); for(int y = 0; y < h; y++) { @@ -1832,7 +1832,7 @@ void CLayerSwitch::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) CLayerSwitch *pLt = static_cast(pBrush); - bool Destructive = m_pEditor->m_BrushDrawDestructive || IsEmpty(pLt); + bool Destructive = m_pEditor->m_BrushDrawDestructive || Empty || IsEmpty(pLt); for(int y = 0; y < h; y++) { @@ -2114,7 +2114,7 @@ void CLayerTune::FillSelection(bool Empty, CLayer *pBrush, CUIRect Rect) CLayerTune *pLt = static_cast(pBrush); - bool Destructive = m_pEditor->m_BrushDrawDestructive || IsEmpty(pLt); + bool Destructive = m_pEditor->m_BrushDrawDestructive || Empty || IsEmpty(pLt); for(int y = 0; y < h; y++) {