FIX game hanging when units with 0 min-range attack units at 0 range.
Fixes #13307
This commit is contained in:
@@ -102,7 +102,8 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
var pos = self.CenterPosition;
|
var pos = self.CenterPosition;
|
||||||
var mobile = move as Mobile;
|
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)))
|
|| (mobile != null && !mobile.CanInteractWithGroundLayer(self)))
|
||||||
{
|
{
|
||||||
// Try to move within range, drop the target otherwise
|
// Try to move within range, drop the target otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user