Check if the minelayer is destroyed.

This commit is contained in:
Matthias Mailänder
2026-01-13 20:47:20 +01:00
committed by Gustas Kažukauskas
parent ea07cb2cb1
commit a6c58c0f68

View File

@@ -174,10 +174,13 @@ namespace OpenRA.Mods.Common.Activities
yield return new TargetLineNode(Target.FromCell(self.World, c), minelayer.Info.TargetLineColor, tile: minelayer.Tile);
}
static bool CanLayMine(Actor self, CPos p)
static bool CanLayMine(Actor self, CPos location)
{
if (self.IsDead || !self.IsInWorld)
return false;
// If there is no unit (other than me) here, we can place a mine here
return self.World.ActorMap.GetActorsAt(p).All(a => a == self);
return self.World.ActorMap.GetActorsAt(location).All(a => a == self);
}
bool StartLayingMine(Actor self)