From e97efc89cbb78af429c8b8a019fb9f4faf3c7ced Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 20 Jul 2014 17:37:50 +0200 Subject: [PATCH] Make aircraft not waste their missiles by firing from outside the map Fixes #6001. This obviously affects Yaks as well as Migs, even though Yaks had no trouble with attacking from outside the map. --- OpenRA.Mods.RA/Air/AttackPlane.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Air/AttackPlane.cs b/OpenRA.Mods.RA/Air/AttackPlane.cs index c259ad2b3a..6025e8a27d 100755 --- a/OpenRA.Mods.RA/Air/AttackPlane.cs +++ b/OpenRA.Mods.RA/Air/AttackPlane.cs @@ -29,8 +29,8 @@ namespace OpenRA.Mods.RA.Air protected override bool CanAttack(Actor self, Target target) { - // dont fire while landed - return base.CanAttack(self, target) && self.CenterPosition.Z > 0; + // dont fire while landed or when outside the map + return base.CanAttack(self, target) && self.CenterPosition.Z > 0 && self.World.Map.Contains(self.Location); } } }