Exclude dead actors from ChooseResupplier
This commit is contained in:
@@ -47,7 +47,8 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
return self.World.ActorsHavingTrait<Reservable>()
|
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)
|
&& rearmInfo.RearmActors.Contains(a.Info.Name)
|
||||||
&& (!unreservedOnly || Reservable.IsAvailableFor(a, self)))
|
&& (!unreservedOnly || Reservable.IsAvailableFor(a, self)))
|
||||||
.ClosestTo(self);
|
.ClosestTo(self);
|
||||||
|
|||||||
Reference in New Issue
Block a user