From 9cbc16b6a342c2e322ded197c8deb1aba747d3db Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 11 Aug 2015 15:06:13 +0200 Subject: [PATCH] If aircraft has FallsToEarth, return instead of just skipping reservation. --- OpenRA.Mods.Common/Traits/Air/Helicopter.cs | 6 ++++-- OpenRA.Mods.Common/Traits/Air/Plane.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Helicopter.cs b/OpenRA.Mods.Common/Traits/Air/Helicopter.cs index 0cf5cdfc13..ad014678ce 100644 --- a/OpenRA.Mods.Common/Traits/Air/Helicopter.cs +++ b/OpenRA.Mods.Common/Traits/Air/Helicopter.cs @@ -133,8 +133,10 @@ namespace OpenRA.Mods.Common.Traits if (firstTick) { firstTick = false; - if (!self.HasTrait()) // TODO: Aircraft husks don't properly unreserve. - ReserveSpawnBuilding(); + if (self.HasTrait()) // TODO: Aircraft husks don't properly unreserve. + return; + + ReserveSpawnBuilding(); var host = GetActorBelow(); if (host == null) diff --git a/OpenRA.Mods.Common/Traits/Air/Plane.cs b/OpenRA.Mods.Common/Traits/Air/Plane.cs index b993cefe03..aaa249a68a 100644 --- a/OpenRA.Mods.Common/Traits/Air/Plane.cs +++ b/OpenRA.Mods.Common/Traits/Air/Plane.cs @@ -43,8 +43,10 @@ namespace OpenRA.Mods.Common.Traits if (firstTick) { firstTick = false; - if (!self.HasTrait()) // TODO: Aircraft husks don't properly unreserve. - ReserveSpawnBuilding(); + if (self.HasTrait()) // TODO: Aircraft husks don't properly unreserve. + return; + + ReserveSpawnBuilding(); var host = GetActorBelow(); if (host == null)