Prevent movement pausing at invalid position.

This commit is contained in:
Paul Chote
2019-10-18 22:52:31 +01:00
committed by reaperrr
parent ae34410c80
commit 69970d42f3
8 changed files with 84 additions and 49 deletions

View File

@@ -221,6 +221,11 @@ namespace OpenRA.Mods.Common.Traits
if (captures == null)
return false;
// HACK: Make sure the target is not moving and at its normal position with respect to the cell grid
var enterMobile = target.TraitOrDefault<Mobile>();
if (enterMobile != null && enterMobile.IsMovingBetweenCells)
return false;
if (progressWatchers.Any() || targetManager.progressWatchers.Any())
{
currentTargetTotal = captures.Info.CaptureDelay;