From 801796b1844284861238eb7c67a149492b20a734 Mon Sep 17 00:00:00 2001 From: Forcecore Date: Fri, 7 Jul 2017 21:32:29 -0500 Subject: [PATCH] FIX game hanging when units with 0 min-range attack units at 0 range. Fixes #13307 --- OpenRA.Mods.Common/Activities/Attack.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Activities/Attack.cs b/OpenRA.Mods.Common/Activities/Attack.cs index c3d701f7f3..b013b91905 100644 --- a/OpenRA.Mods.Common/Activities/Attack.cs +++ b/OpenRA.Mods.Common/Activities/Attack.cs @@ -102,7 +102,8 @@ namespace OpenRA.Mods.Common.Activities var pos = self.CenterPosition; var mobile = move as Mobile; - if (!Target.IsInRange(pos, maxRange) || Target.IsInRange(pos, minRange) + if (!Target.IsInRange(pos, maxRange) + || (minRange.Length != 0 && Target.IsInRange(pos, minRange)) || (mobile != null && !mobile.CanInteractWithGroundLayer(self))) { // Try to move within range, drop the target otherwise