Replaced Canceled state with Canceling state.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
bool targetIsHiddenActor;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
bool targetIsHiddenActor;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
if (remainingTicks > 0)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
bool targetIsHiddenActor;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
if (IsCanceled || !self.World.Map.Contains(self.Location))
|
||||
if (IsCanceling || !self.World.Map.Contains(self.Location))
|
||||
return NextActivity;
|
||||
|
||||
Fly.FlyToward(self, aircraft, aircraft.Facing, aircraft.Info.CruiseAltitude);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
if (IsCanceled || remainingTicks-- == 0)
|
||||
if (IsCanceling || remainingTicks-- == 0)
|
||||
return NextActivity;
|
||||
|
||||
Fly.FlyToward(self, aircraft, aircraft.Facing, cruiseAltitude);
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
bool targetIsHiddenActor;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
bool targetIsHiddenActor;
|
||||
@@ -156,7 +156,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
var activity = base.Tick(self);
|
||||
|
||||
if (activity == null && !IsCanceled && info.LandWhenIdle)
|
||||
if (activity == null && !IsCanceling && info.LandWhenIdle)
|
||||
{
|
||||
if (info.TurnToLand)
|
||||
self.QueueActivity(new Turn(self, info.InitialFacing));
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
if (HeliFly.AdjustAltitude(self, aircraft, aircraft.Info.CruiseAltitude))
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
if (requireSpace && !aircraft.CanLand(self.Location))
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
return NextActivity;
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
if (dest == null || dest.IsDead || !Reservable.IsAvailableFor(dest, self))
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (!target.IsValidFor(self))
|
||||
Cancel(self);
|
||||
|
||||
if (IsCanceled)
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
if (!soundPlayed && aircraft.Info.LandingSounds.Length > 0 && !self.IsAtGroundLevel())
|
||||
|
||||
@@ -51,11 +51,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
}
|
||||
|
||||
// Conditional fixes being able to stop aircraft from resupplying.
|
||||
if (IsCanceled && NextInQueue == null)
|
||||
{
|
||||
OnFirstRun(self);
|
||||
return this;
|
||||
}
|
||||
if (IsCanceling && NextInQueue == null)
|
||||
return new ResupplyAircraft(self);
|
||||
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.ForceLanding)
|
||||
return NextActivity;
|
||||
|
||||
if (IsCanceled || self.IsDead)
|
||||
if (IsCanceling || self.IsDead)
|
||||
return NextActivity;
|
||||
|
||||
if (!isCalculated)
|
||||
|
||||
Reference in New Issue
Block a user