Always make sure to be on the host actor when repairing

This commit is contained in:
abcdefg30
2017-05-26 09:49:17 +02:00
committed by reaperrr
parent 2e0d7d0e79
commit 1f93029e51
4 changed files with 8 additions and 7 deletions

View File

@@ -53,11 +53,12 @@ namespace OpenRA.Mods.Cnc.Activities
if (rearmTarget == null)
return new Wait(20);
// Add a CloseEnough range of 512 to the Repair activity in order to ensure that we're at the host actor
return ActivityUtils.SequenceActivities(
new MoveAdjacentTo(self, Target.FromActor(rearmTarget)),
movement.MoveTo(self.World.Map.CellContaining(rearmTarget.CenterPosition), rearmTarget),
new Rearm(self),
new Repair(self, rearmTarget),
new Repair(self, rearmTarget, new WDist(512)),
this);
}