Clean up usage of CancelActivity.

This commit is contained in:
tovl
2019-08-31 16:47:12 +02:00
committed by reaperrr
parent 1e786b8e31
commit ac6431acf8
22 changed files with 24 additions and 83 deletions

View File

@@ -318,8 +318,7 @@ namespace OpenRA.Mods.Common.Traits
if (moveTo.HasValue)
{
self.CancelActivity();
self.QueueActivity(new Move(self, moveTo.Value, WDist.Zero));
self.QueueActivity(false, new Move(self, moveTo.Value, WDist.Zero));
self.ShowTargetLines();
Log.Write("debug", "OnNudge #{0} from {1} to {2}",
@@ -335,8 +334,7 @@ namespace OpenRA.Mods.Common.Traits
if (cellInfo != null)
{
self.CancelActivity();
self.QueueActivity(new CallFunc(() => self.NotifyBlocker(cellInfo.Cell)));
self.QueueActivity(false, new CallFunc(() => self.NotifyBlocker(cellInfo.Cell)));
self.QueueActivity(new WaitFor(() => CanEnterCell(cellInfo.Cell)));
self.QueueActivity(new Move(self, cellInfo.Cell));
@@ -863,9 +861,6 @@ namespace OpenRA.Mods.Common.Traits
if (!Info.LocomotorInfo.MoveIntoShroud && !self.Owner.Shroud.IsExplored(cell))
return;
if (!order.Queued)
self.CancelActivity();
self.QueueActivity(order.Queued, WrapMove(new Move(self, cell, WDist.FromCells(8), null, true, Color.Green)));
self.ShowTargetLines();
}