Change Resupply closeEnough 'infinite' to negative

...instead of 'zero'.

Returning 'true' at a distance of zero was a legacy left-over
that isn't used anymore once #16695 is merged.
This commit is contained in:
reaperrr
2019-07-19 18:21:16 +02:00
committed by abcdefg30
parent fa41554309
commit 7f4fbfcf46

View File

@@ -79,7 +79,7 @@ namespace OpenRA.Mods.Common.Activities
// HACK: If the activity is cancelled while we're already resupplying (or about to start resupplying),
// move actor outside the resupplier footprint.
// TODO: This check is nowhere near robust enough, and should be rewritten.
var isCloseEnough = closeEnough.LengthSquared == 0 || (host.CenterPosition - self.CenterPosition).HorizontalLengthSquared <= closeEnough.LengthSquared;
var isCloseEnough = closeEnough < WDist.Zero || (host.CenterPosition - self.CenterPosition).HorizontalLengthSquared <= closeEnough.LengthSquared;
if (IsCanceling && isCloseEnough)
{
foreach (var notifyResupply in notifyResupplies)