From c7ed2aacaff621391efaa48acac03122b2f0b02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 31 Mar 2014 13:23:59 +0200 Subject: [PATCH] check for valid targets when flying closes #4972 --- OpenRA.Mods.RA/Air/Fly.cs | 2 +- OpenRA.Mods.RA/Air/HeliFly.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Air/Fly.cs b/OpenRA.Mods.RA/Air/Fly.cs index 00932de85d..0ef39e1256 100755 --- a/OpenRA.Mods.RA/Air/Fly.cs +++ b/OpenRA.Mods.RA/Air/Fly.cs @@ -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 diff --git a/OpenRA.Mods.RA/Air/HeliFly.cs b/OpenRA.Mods.RA/Air/HeliFly.cs index 881faf0daf..c79304d386 100755 --- a/OpenRA.Mods.RA/Air/HeliFly.cs +++ b/OpenRA.Mods.RA/Air/HeliFly.cs @@ -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))