From 8b618ef7bc77b7649cfd497962d8d0079af9b6d5 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 2 Mar 2019 11:09:37 +0000 Subject: [PATCH] Fix maximum range estimation for stationary turrets. --- OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs b/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs index 0c601992e0..63558b2686 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs @@ -206,7 +206,7 @@ namespace OpenRA.Mods.Common.Traits lastVisibleMinimumRange = attack.GetMinimumRange(); // Try and sit at least one cell away from the min or max ranges to give some leeway if the target starts moving. - if (target.Actor.Info.HasTraitInfo()) + if (move != null && target.Actor.Info.HasTraitInfo()) { var preferMinRange = Math.Min(lastVisibleMinimumRange.Length + 1024, lastVisibleMaximumRange.Length); var preferMaxRange = Math.Max(lastVisibleMaximumRange.Length - 1024, lastVisibleMinimumRange.Length);