From d5f4813bc40fa2c28cea1e4c76b4e3b1b58fe92f Mon Sep 17 00:00:00 2001 From: Taryn Date: Fri, 21 Feb 2014 19:04:49 -0600 Subject: [PATCH] Actors with EnableStances set to false should now ignore stance change commands. --- OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs index ca05bf27ed..0c2ed93183 100644 --- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs +++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs @@ -148,6 +148,10 @@ namespace OpenRA.Mods.RA.Widgets if (actor.First == null) return true; + var ati = actor.First.Info.Traits.GetOrDefault(); + if (ati == null || !ati.EnableStances) + return false; + var stances = Enum.GetValues(); var nextStance = stances.Concat(stances) .SkipWhile(s => s != actor.Second.PredictedStance)