Skip to content

Commit 3dd3e85

Browse files
committed
Fix bug where tile rendering did not properly take preview height level into account
1 parent 21581e3 commit 3dd3e85

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/TSMapEditor/Rendering/MapView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,13 +726,13 @@ public void DrawTerrainTile(MapTile tile)
726726

727727
int extraDrawY = drawPoint.Y + tmpImage.TmpImage.YExtra - tmpImage.TmpImage.Y;
728728

729-
if (!minimapNeedsRefresh && drawPoint.Y - (tile.Level * Constants.CellHeight) > GetCameraBottomYCoord())
729+
if (!minimapNeedsRefresh && drawPoint.Y - (level * Constants.CellHeight) > GetCameraBottomYCoord())
730730
{
731731
if (tmpImage.ExtraTexture == null)
732732
return;
733733

734734
// If we have extra graphics, need to check whether they are on screen
735-
if (extraDrawY - (tile.Level * Constants.CellHeight) > GetCameraBottomYCoord())
735+
if (extraDrawY - (level * Constants.CellHeight) > GetCameraBottomYCoord())
736736
return;
737737
}
738738

@@ -778,7 +778,7 @@ public void DrawTerrainTile(MapTile tile)
778778
!TheaterGraphics.HasSeparateMarbleMadnessTileGraphics(tileImage.TileID))
779779
{
780780
textureToDraw = EditorGraphics.GenericTileWithBorderTexture;
781-
color = MarbleMadnessTileHeightLevelColors[tile.Level];
781+
color = MarbleMadnessTileHeightLevelColors[level];
782782
}
783783

784784
DrawTexture(textureToDraw, new Rectangle(drawPoint.X, drawPoint.Y,

0 commit comments

Comments
 (0)