Replaced Canceled state with Canceling state.

This commit is contained in:
tovl
2019-03-03 01:57:17 +01:00
committed by Paul Chote
parent 8191a6566b
commit a17cd0fa06
43 changed files with 74 additions and 108 deletions

View File

@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.Activities
useLastVisibleTarget = targetIsHiddenActor || !target.IsValidFor(self);
// Cancel immediately if the target died while we were entering it
if (!IsCanceled && useLastVisibleTarget && lastState == EnterState.Entering)
if (!IsCanceling && useLastVisibleTarget && lastState == EnterState.Entering)
Cancel(self, true);
TickInner(self, target, useLastVisibleTarget);
@@ -101,7 +101,7 @@ namespace OpenRA.Mods.Common.Activities
{
// NOTE: We can safely cancel in this case because we know the
// actor has finished any in-progress move activities
if (IsCanceled)
if (IsCanceling)
return NextActivity;
// Lost track of the target
@@ -134,7 +134,7 @@ namespace OpenRA.Mods.Common.Activities
// Subclasses can cancel the activity during TryStartEnter
// Return immediately to avoid an extra tick's delay
if (IsCanceled)
if (IsCanceling)
return NextActivity;
lastState = EnterState.Waiting;
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Activities
{
// Check that we reached the requested position
var targetPos = target.Positions.PositionClosestTo(self.CenterPosition);
if (!IsCanceled && self.CenterPosition == targetPos && target.Type == TargetType.Actor)
if (!IsCanceling && self.CenterPosition == targetPos && target.Type == TargetType.Actor)
OnEnterComplete(self, target.Actor);
lastState = EnterState.Exiting;
@@ -164,8 +164,8 @@ namespace OpenRA.Mods.Common.Activities
{
OnCancel(self);
if (!IsCanceled && moveActivity != null && !moveActivity.Cancel(self))
return false;
if (!IsCanceling && moveActivity != null)
moveActivity.Cancel(self);
return base.Cancel(self, keepQueue);
}