diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index b8ab0f7b3d..5d3f90309f 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -73,7 +73,7 @@ namespace OpenRA.Traits public interface IDisable { bool Disabled { get; } } public interface IExplodeModifier { bool ShouldExplode(Actor self); } - public interface INudge { void OnNudge(Actor self, Actor nudger); } + public interface INudge { void OnNudge(Actor self, Actor nudger, bool force); } public interface IRadarSignature { diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index a3eac5aff1..5a3b5cb3f3 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -269,7 +269,7 @@ namespace OpenRA.Mods.RA.Move if (order.OrderString == "Scatter") { - OnNudge(self, self); + OnNudge(self, self, true); } } @@ -365,15 +365,14 @@ namespace OpenRA.Mods.RA.Move self.World.ActorMap.Remove(self, this); } - public void OnNudge(Actor self, Actor nudger) + public void OnNudge(Actor self, Actor nudger, bool force) { /* initial fairly braindead implementation. */ - - if (self.Owner.Stances[nudger.Owner] != Stance.Ally) + if (!force && self.Owner.Stances[nudger.Owner] != Stance.Ally) return; /* don't allow ourselves to be pushed around * by the enemy! */ - if (!self.IsIdle) + if (!force && !self.IsIdle) return; /* don't nudge if we're busy doing something! */ // pick an adjacent available cell. diff --git a/OpenRA.Mods.RA/Move/Move.cs b/OpenRA.Mods.RA/Move/Move.cs index d67ccfef8a..3d1823e2da 100755 --- a/OpenRA.Mods.RA/Move/Move.cs +++ b/OpenRA.Mods.RA/Move/Move.cs @@ -170,7 +170,7 @@ namespace OpenRA.Mods.RA.Move var nudge = blocker.TraitOrDefault(); if (nudge != null) - nudge.OnNudge(blocker, self); + nudge.OnNudge(blocker, self, false); } Pair? PopPath( Actor self, Mobile mobile )