Refactor FlyAttack to make strafing runs interruptible when target becomes invalid.

This commit is contained in:
tovl
2019-08-13 21:03:55 +02:00
committed by abcdefg30
parent e600848947
commit 70459b311e
2 changed files with 24 additions and 17 deletions

View File

@@ -39,6 +39,9 @@ namespace OpenRA.Mods.Common.Activities
if (aircraft.ForceLanding)
return;
if (self.World.Map.DistanceAboveTerrain(aircraft.CenterPosition).Length >= aircraft.Info.MinAirborneAltitude)
return;
// We are taking off, so remove reservation and influence in ground cells.
aircraft.UnReserve();
aircraft.RemoveInfluence();