From 3edc4da15cadf2976fcd3c0a6433c4824ff08b46 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 12 Jun 2016 18:01:04 +0200 Subject: [PATCH] Fix disabled AA gun continuing to track targets --- OpenRA.Mods.Common/Traits/Turreted.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Turreted.cs b/OpenRA.Mods.Common/Traits/Turreted.cs index 4fb36fbd83..749282e8ab 100644 --- a/OpenRA.Mods.Common/Traits/Turreted.cs +++ b/OpenRA.Mods.Common/Traits/Turreted.cs @@ -110,6 +110,9 @@ namespace OpenRA.Mods.Common.Traits public bool FaceTarget(Actor self, Target target) { + if (self.IsDisabled()) + return false; + var delta = target.CenterPosition - self.CenterPosition; DesiredFacing = delta.HorizontalLengthSquared != 0 ? delta.Yaw.Facing : TurretFacing; MoveTurret();