Replaced Canceled state with Canceling state.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user