Abort activities when we don't know how close to move to a target.

This commit is contained in:
Paul Chote
2019-02-08 20:29:08 +00:00
committed by Oliver Brakmann
parent 2d4bad66ae
commit 49621bebd0
3 changed files with 3 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Cnc.Activities
if (!checkTarget.IsInRange(pos, lastVisibleMaxRange) || checkTarget.IsInRange(pos, lastVisibleMinRange))
{
if (!allowMovement)
if (!allowMovement || lastVisibleMaxRange == WDist.Zero || lastVisibleMaxRange < lastVisibleMinRange)
return NextActivity;
QueueChild(mobile.MoveWithinRange(target, lastVisibleMinRange, lastVisibleMaxRange, checkTarget.CenterPosition, Color.Red));