Merge pull request #5001 from Mailaender/fly-valid-target

Added checks for valid targets when flying
This commit is contained in:
Paul Chote
2014-04-01 18:25:51 +13:00
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ namespace OpenRA.Mods.RA.Air
public override Activity Tick(Actor self)
{
if (IsCanceled)
if (IsCanceled || !target.IsValidFor(self))
return NextActivity;
// Inside the target annulus, so we're done

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.RA.Air
public override Activity Tick(Actor self)
{
if (IsCanceled)
if (IsCanceled || !target.IsValidFor(self))
return NextActivity;
if (AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude))