Account for allied service depot when ordering an auto repair
This commit is contained in:
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
var repairBuilding = self.World.ActorsWithTrait<RepairsUnits>()
|
var repairBuilding = self.World.ActorsWithTrait<RepairsUnits>()
|
||||||
.Where(a => !a.Actor.IsDead && a.Actor.IsInWorld
|
.Where(a => !a.Actor.IsDead && a.Actor.IsInWorld
|
||||||
&& a.Actor.Owner == self.Owner &&
|
&& a.Actor.Owner.IsAlliedWith(self.Owner) &&
|
||||||
info.RepairBuildings.Contains(a.Actor.Info.Name))
|
info.RepairBuildings.Contains(a.Actor.Info.Name))
|
||||||
.OrderBy(p => (self.Location - p.Actor.Location).LengthSquared);
|
.OrderBy(p => (self.Location - p.Actor.Location).LengthSquared);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user