Skip to content

Commit

Permalink
Fix aircraft not returning to rearm after running out of ammo.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Jan 29, 2019
1 parent 7dcbc43 commit 20c5f5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenRA.Mods.Common/Activities/Air/FlyAttack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public override Activity Tick(Actor self)

// If all valid weapons have depleted their ammo and Rearmable trait exists, return to RearmActor
if (rearmable != null && attackAircraft.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self)))
return ActivityUtils.SequenceActivities(new ReturnToBase(self, aircraft.Info.AbortOnResupply));
{
self.QueueActivity(new ReturnToBase(self, aircraft.Info.AbortOnResupply));
return NextActivity;
}

attackAircraft.DoAttack(self, target);

Expand Down

0 comments on commit 20c5f5d

Please sign in to comment.