From 92452271feabbd7086ca040f1bbb2ce218e38f1c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 23 Oct 2014 22:13:05 +1300 Subject: [PATCH] Use per-tile color in minimap. --- OpenRA.Game/Graphics/Minimap.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Graphics/Minimap.cs b/OpenRA.Game/Graphics/Minimap.cs index afe5aac491..b092b3c1b5 100644 --- a/OpenRA.Game/Graphics/Minimap.cs +++ b/OpenRA.Game/Graphics/Minimap.cs @@ -44,8 +44,10 @@ namespace OpenRA.Graphics { var mapX = x + b.Left; var mapY = y + b.Top; - var type = tileset[tileset.GetTerrainIndex(mapTiles[new MPos(mapX, mapY)])]; - colors[y * stride + x] = type.Color.ToArgb(); + var type = tileset.GetTileInfo(mapTiles[new MPos(mapX, mapY)]); + var color = type != null ? type.LeftColor : Color.Black; + + colors[y * stride + x] = color.ToArgb(); } } }