diff --git a/OpenRA.Mods.Common/Traits/Buildings/Exit.cs b/OpenRA.Mods.Common/Traits/Buildings/Exit.cs index 54b35ac4a9..7940d1c522 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Exit.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Exit.cs @@ -15,7 +15,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Where the unit should leave the building. Multiples are allowed if IDs are added: Exit@2, ...")] - public class ExitInfo : TraitInfo + public class ExitInfo : TraitInfo, Requires { [Desc("Offset at which that the exiting actor is spawned relative to the center of the producing actor.")] public readonly WVec SpawnOffset = WVec.Zero; diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index 87c033c7bf..a2d1781a29 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -118,17 +118,11 @@ namespace OpenRA.Mods.Common.Traits if (Reservable.IsReserved(self)) return false; - if (!occupiesSpace) - { - DoProduction(self, producee, null, factionVariant); - return true; - } - // Pick a spawn/exit point pair var exit = self.Info.Traits.WithInterface().Shuffle(self.World.SharedRandom) .FirstOrDefault(e => CanUseExit(self, producee, e)); - if (exit != null) + if (exit != null || !occupiesSpace) { DoProduction(self, producee, exit, factionVariant); return true;