check for valid targets when flying

closes #4972
This commit is contained in:
Matthias Mailänder
2014-03-31 13:23:59 +02:00
parent c4b28b9016
commit c7ed2aacaf
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) public override Activity Tick(Actor self)
{ {
if (IsCanceled) if (IsCanceled || !target.IsValidFor(self))
return NextActivity; return NextActivity;
// Inside the target annulus, so we're done // 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) public override Activity Tick(Actor self)
{ {
if (IsCanceled) if (IsCanceled || !target.IsValidFor(self))
return NextActivity; return NextActivity;
if (AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude)) if (AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude))