return ret;
}
+ public Dictionary<UUID, string> KnownAnimations;
+
public StateManager(RadegastInstance instance)
{
this.instance = instance;
this.instance.ClientChanged += new EventHandler<ClientChangedEventArgs>(instance_ClientChanged);
+ KnownAnimations = Animations.ToDictionary();
beamTimer = new System.Timers.Timer();
beamTimer.Enabled = false;
{
SitStateChanged(this, new SitEventArgs(this.sitting));
}
+
+ if (!this.sitting)
+ {
+ StopAllAnimations();
+ }
+ }
+
+ public void StopAllAnimations()
+ {
+ Dictionary<UUID, bool> stop = new Dictionary<UUID,bool>();
+
+ client.Self.SignaledAnimations.ForEach((UUID anim) =>
+ {
+ if (!KnownAnimations.ContainsKey(anim))
+ {
+ stop.Add(anim, false);
+ }
+ });
+
+ if (stop.Count > 0)
+ {
+ client.Self.Animate(stop, true);
+ }
}
public Vector3d GlobalPosition(Simulator sim, Vector3 pos)