diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 697b86d6cb..12d897558b 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -251,9 +251,6 @@ namespace OpenRA.Mods.Common.Traits SetPosition(self, init.Get()); Facing = init.Contains() ? init.Get() : Info.InitialFacing; - - // SkipMoveIntoWorldInit is deliberately ignored for Aircraft - // MoveIntoWorld must run for aircraft for map-placed actors to be associated with their airfields moveIntoWorldDelay = init.Contains() ? init.Get() : 0; } diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 46046c6df7..8b3a722bc7 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits { readonly Actor self; readonly Lazy> speedModifiers; - readonly int? moveIntoWorldDelay; + readonly int moveIntoWorldDelay; #region IMove CurrentMovementTypes MovementType movementTypes; @@ -243,8 +243,7 @@ namespace OpenRA.Mods.Common.Traits if (init.Contains()) SetVisualPosition(self, init.Get()); - if (!init.Contains()) - moveIntoWorldDelay = init.Contains() ? init.Get() : 0; + moveIntoWorldDelay = init.Contains() ? init.Get() : 0; } protected override void Created(Actor self) @@ -899,7 +898,7 @@ namespace OpenRA.Mods.Common.Traits Activity ICreationActivity.GetCreationActivity() { - return moveIntoWorldDelay.HasValue ? MoveIntoWorld(self, moveIntoWorldDelay.Value) : null; + return MoveIntoWorld(self, moveIntoWorldDelay); } class MoveOrderTargeter : IOrderTargeter diff --git a/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs b/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs index 7abb1c0333..8aea1cd7aa 100644 --- a/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs +++ b/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs @@ -90,7 +90,6 @@ namespace OpenRA.Mods.Common.Traits new LocationInit(sp + unitGroup.BaseActorOffset), new OwnerInit(p), new SkipMakeAnimsInit(), - new SkipMoveIntoWorldInit(), new FacingInit(unitGroup.BaseActorFacing < 0 ? w.SharedRandom.Next(256) : unitGroup.BaseActorFacing), }); } diff --git a/OpenRA.Mods.Common/Traits/World/SpawnMapActors.cs b/OpenRA.Mods.Common/Traits/World/SpawnMapActors.cs index 5f47e4e95b..ca95ed5ff9 100644 --- a/OpenRA.Mods.Common/Traits/World/SpawnMapActors.cs +++ b/OpenRA.Mods.Common/Traits/World/SpawnMapActors.cs @@ -41,7 +41,6 @@ namespace OpenRA.Mods.Common.Traits var initDict = actorReference.InitDict; initDict.Add(new SkipMakeAnimsInit()); - initDict.Add(new SkipMoveIntoWorldInit()); initDict.Add(new SpawnedByMapInit(kv.Key)); if (PreventMapSpawn(world, actorReference, preventMapSpawns)) @@ -64,7 +63,6 @@ namespace OpenRA.Mods.Common.Traits } public class SkipMakeAnimsInit : IActorInit, ISuppressInitExport { } - public class SkipMoveIntoWorldInit : IActorInit, ISuppressInitExport { } public class SpawnedByMapInit : IActorInit, ISuppressInitExport { public readonly string Name;