Skip to content

Commit

Permalink
Fix graphical artifacts when painting terrain
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Sep 5, 2024
1 parent 4f8c60e commit 5bdca9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TSMapEditor/UI/CursorActions/PlaceTerrainCursorAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ private void ClearPreview()
for (int i = 0; i < previewTiles.Count; i++)
{
previewTiles[i].PreviewTileImage = null;
previewTiles[i].PreviewLevel = -1;
}

previewTiles.Clear();
Expand Down Expand Up @@ -185,6 +186,7 @@ private void ApplyPreviewForCells(Point2D cellCoords)
if (autoLatTileIndex > -1)
{
cell.PreviewTileImage = CursorActionTarget.TheaterGraphics.GetTileGraphics(autoLatTileIndex, 0);
cell.PreviewLevel = cell.Level;
previewTiles.Add(cell);
}
});
Expand All @@ -196,6 +198,8 @@ private void ApplyPreviewForCells(Point2D cellCoords)
if (autoLatTileIndex > -1)
{
cell.PreviewTileImage = CursorActionTarget.TheaterGraphics.GetTileGraphics(autoLatTileIndex, 0);
if (cell.PreviewLevel < 0)
cell.PreviewLevel = cell.Level;
}
});
}
Expand Down

0 comments on commit 5bdca9f

Please sign in to comment.