diff --git a/OpenRA.Mods.Common/Activities/Move/Move.cs b/OpenRA.Mods.Common/Activities/Move/Move.cs index b115c9939a..1aed34190e 100644 --- a/OpenRA.Mods.Common/Activities/Move/Move.cs +++ b/OpenRA.Mods.Common/Activities/Move/Move.cs @@ -158,9 +158,7 @@ namespace OpenRA.Mods.Common.Activities { mobile.TurnToMove = false; - // If the actor is inside a tunnel then we must let them move - // all the way through before moving to the next activity - if (IsCanceling && self.Location.Layer != CustomMovementLayerType.Tunnel && mobile.CanStayInCell(mobile.ToCell)) + if (IsCanceling && mobile.CanStayInCell(mobile.ToCell)) { if (path != null) path.Clear(); diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 9def14deae..95039fe140 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -109,6 +109,9 @@ namespace OpenRA.Mods.Common.Traits locomotor = world.WorldActor.TraitsImplementing() .SingleOrDefault(l => l.Info.Name == Locomotor); + if (cell.Layer == CustomMovementLayerType.Tunnel) + return false; + return locomotor.CanStayInCell(cell); }