Add crushing logic to aircraft.
This commit is contained in:
@@ -105,6 +105,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
soundPlayed = true;
|
||||
}
|
||||
|
||||
// We are taking off, so remove influence in ground cells.
|
||||
if (self.IsAtGroundLevel())
|
||||
aircraft.RemoveInfluence();
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
soundPlayed = true;
|
||||
}
|
||||
|
||||
// We are taking off, so remove influence in ground cells.
|
||||
if (self.IsAtGroundLevel())
|
||||
aircraft.RemoveInfluence();
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
using OpenRA.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
@@ -37,6 +38,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (ChildActivity != null)
|
||||
{
|
||||
ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
|
||||
if (ChildActivity != null)
|
||||
return this;
|
||||
}
|
||||
|
||||
if (IsCanceling)
|
||||
{
|
||||
aircraft.RemoveInfluence();
|
||||
@@ -48,11 +56,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
var landingCell = self.Location;
|
||||
if (!aircraft.CanLand(landingCell, ignoreActor))
|
||||
{
|
||||
QueueChild(self, new Wait(25), true);
|
||||
self.NotifyBlocker(landingCell);
|
||||
return this;
|
||||
}
|
||||
|
||||
aircraft.AddInfluence(landingCell);
|
||||
aircraft.EnteringCell(self);
|
||||
landingInitiated = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
}
|
||||
|
||||
aircraft.AddInfluence(landingCell);
|
||||
aircraft.EnteringCell(self);
|
||||
landingInitiated = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user