add hook for stance change notifications
This commit is contained in:
@@ -189,6 +189,9 @@ namespace OpenRA.Network
|
||||
p.Stances[target] = s;
|
||||
if (target == w.LocalPlayer)
|
||||
w.WorldActor.Trait<Shroud>().UpdatePlayerStance(w, p, oldStance, s);
|
||||
|
||||
foreach (var nsc in w.Queries.WithTrait<INotifyStanceChanged>())
|
||||
nsc.Trait.StanceChanged(p, target, oldStance, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,4 +229,5 @@ namespace OpenRA.Traits
|
||||
}
|
||||
|
||||
public interface INotifyKeyPress { bool KeyPressed(Actor self, KeyInput e); }
|
||||
public interface INotifyStanceChanged { void StanceChanged(Player a, Player b, Stance oldStance, Stance newStance); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user