add hook for stance change notifications

This commit is contained in:
Chris Forbes
2011-02-13 16:22:34 +13:00
parent cbf95e8f1a
commit 6281fa481f
2 changed files with 6 additions and 2 deletions

View File

@@ -188,7 +188,10 @@ namespace OpenRA.Network
var oldStance = p.Stances[target];
p.Stances[target] = s;
if (target == w.LocalPlayer)
w.WorldActor.Trait<Shroud>().UpdatePlayerStance(w, p, oldStance, s);
w.WorldActor.Trait<Shroud>().UpdatePlayerStance(w, p, oldStance, s);
foreach (var nsc in w.Queries.WithTrait<INotifyStanceChanged>())
nsc.Trait.StanceChanged(p, target, oldStance, s);
}
}
}