diff --git a/OpenRa.Game/Graphics/Minimap.cs b/OpenRa.Game/Graphics/Minimap.cs index 79022d3c47..a8dfcebf4c 100644 --- a/OpenRa.Game/Graphics/Minimap.cs +++ b/OpenRa.Game/Graphics/Minimap.cs @@ -1,4 +1,6 @@ using System.Drawing; +using System.Linq; +using OpenRa.Game.Traits; namespace OpenRa.Game.Graphics { @@ -48,13 +50,14 @@ namespace OpenRa.Game.Graphics for( var y = 0; y < 128; y++ ) for (var x = 0; x < 128; x++) { - // todo: units, perf. - var b = Game.BuildingInfluence.GetBuildingAt(new int2(x, y)); if (b != null) bitmap.SetPixel(x, y, b.Owner != null ? Chat.paletteColors[(int)b.Owner.Palette] : Color.Gray); } + foreach (var a in Game.world.Actors.Where(a => a.traits.Contains())) + bitmap.SetPixel(a.Location.X, a.Location.Y, Chat.paletteColors[(int)a.Owner.Palette]); + sheet.Texture.SetData(bitmap); }