Fix aircraft with TakeOffOnCreation=false not freeing exit

...when another actor gets produced.
This commit is contained in:
reaperrr
2021-06-18 17:52:00 +02:00
committed by abcdefg30
parent 44fc4a1d0f
commit a17af87a5e

View File

@@ -1249,7 +1249,11 @@ namespace OpenRA.Mods.Common.Traits
public override bool Tick(Actor self)
{
if (!aircraft.Info.TakeOffOnCreation)
{
// Freshly created aircraft shouldn't block the exit, so we allow them to yield their reservation
aircraft.AllowYieldingReservation();
return true;
}
if (self.World.Map.DistanceAboveTerrain(aircraft.CenterPosition).Length <= aircraft.LandAltitude.Length)
QueueChild(new TakeOff(self));