Exclude dead actors from ChooseResupplier

This commit is contained in:
reaperrr
2019-02-24 23:09:25 +01:00
committed by reaperrr
parent 2cdae0b380
commit 8edf5b56ea

View File

@@ -47,7 +47,8 @@ namespace OpenRA.Mods.Common.Activities
return null;
return self.World.ActorsHavingTrait<Reservable>()
.Where(a => a.Owner == self.Owner
.Where(a => !a.IsDead
&& a.Owner == self.Owner
&& rearmInfo.RearmActors.Contains(a.Info.Name)
&& (!unreservedOnly || Reservable.IsAvailableFor(a, self)))
.ClosestTo(self);