fix perf of uim overlay so it's usable again
This commit is contained in:
@@ -55,11 +55,15 @@ namespace OpenRA
|
|||||||
public void Draw( World world )
|
public void Draw( World world )
|
||||||
{
|
{
|
||||||
if (Game.Settings.UnitDebug)
|
if (Game.Settings.UnitDebug)
|
||||||
for (var i = 0; i < world.Map.MapSize.X; i++)
|
{
|
||||||
for (var j = 0; j < world.Map.MapSize.Y; j++)
|
var uim = world.WorldActor.traits.Get<UnitInfluence>();
|
||||||
if (world.WorldActor.traits.Get<UnitInfluence>().GetUnitsAt(new int2(i, j)).Any())
|
|
||||||
|
for (var i = world.Map.Bounds.Left; i < world.Map.Bounds.Right; i++)
|
||||||
|
for (var j = world.Map.Bounds.Top; j < world.Map.Bounds.Bottom; j++)
|
||||||
|
if (uim.GetUnitsAt(new int2(i, j)).Any())
|
||||||
spriteRenderer.DrawSprite(unitDebug, Game.CellSize * new float2(i, j), "terrain");
|
spriteRenderer.DrawSprite(unitDebug, Game.CellSize * new float2(i, j), "terrain");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void DrawBuildingGrid( World world, string name, BuildingInfo bi )
|
public void DrawBuildingGrid( World world, string name, BuildingInfo bi )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user