LayMines: render minefield cells only if the planned minefield has more than 1 cell

This commit is contained in:
michaeldgg2
2023-07-19 18:41:38 +02:00
committed by Gustas
parent 9dca6ef1c3
commit 74f8db0578

View File

@@ -157,8 +157,9 @@ namespace OpenRA.Mods.Common.Activities
if (nextCell != null)
yield return new TargetLineNode(Target.FromCell(self.World, nextCell.Value), minelayer.Info.TargetLineColor);
foreach (var c in minefield)
yield return new TargetLineNode(Target.FromCell(self.World, c), minelayer.Info.TargetLineColor, tile: minelayer.Tile);
if (minefield.Count > 1)
foreach (var c in minefield)
yield return new TargetLineNode(Target.FromCell(self.World, c), minelayer.Info.TargetLineColor, tile: minelayer.Tile);
}
static bool CanLayMine(Actor self, CPos p)