use ChooseAirfield in ReturnToBase.Tick bailout
This commit is contained in:
@@ -94,11 +94,7 @@ namespace OpenRA.Mods.RA.Air
|
|||||||
Calculate(self);
|
Calculate(self);
|
||||||
if (dest == null)
|
if (dest == null)
|
||||||
{
|
{
|
||||||
var rearmBuildings = self.Info.Traits.Get<PlaneInfo>().RearmBuildings;
|
var nearestAfld = ChooseAirfield(self, false);
|
||||||
var nearestAfld = self.World.ActorsWithTrait<Reservable>()
|
|
||||||
.Where(a => a.Actor.Owner == self.Owner && rearmBuildings.Contains(a.Actor.Info.Name))
|
|
||||||
.Select(a => a.Actor)
|
|
||||||
.ClosestTo(self.CenterLocation);
|
|
||||||
|
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
return Util.SequenceActivities(Fly.ToCell(nearestAfld.Location), new FlyCircle());
|
return Util.SequenceActivities(Fly.ToCell(nearestAfld.Location), new FlyCircle());
|
||||||
|
|||||||
Reference in New Issue
Block a user