Actors with EnableStances set to false should now ignore stance change commands.

This commit is contained in:
Taryn
2014-02-21 19:04:49 -06:00
parent dcac88b27b
commit d5f4813bc4

View File

@@ -148,6 +148,10 @@ namespace OpenRA.Mods.RA.Widgets
if (actor.First == null)
return true;
var ati = actor.First.Info.Traits.GetOrDefault<AutoTargetInfo>();
if (ati == null || !ati.EnableStances)
return false;
var stances = Enum<UnitStance>.GetValues();
var nextStance = stances.Concat(stances)
.SkipWhile(s => s != actor.Second.PredictedStance)