From 7461fe4554f8104212071e3e01b07786f8eb546f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 May 2012 15:27:37 +0100 Subject: ªTEST MESS* reduce animation packets send. Added onchangeanim event with parameters to define if to add or remove, and if to send anims pack on that evocation, etc --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index bb76717..7db6014 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -98,6 +98,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event AvatarPickerRequest OnAvatarPickerRequest; public event StartAnim OnStartAnim; public event StopAnim OnStopAnim; + public event ChangeAnim OnChangeAnim; public event Action OnRequestAvatarsData; public event LinkObjects OnLinkObjects; public event DelinkObjects OnDelinkObjects; @@ -6386,7 +6387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } #endregion - +/* StartAnim handlerStartAnim = null; StopAnim handlerStopAnim = null; @@ -6410,6 +6411,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } return true; +*/ + ChangeAnim handlerChangeAnim = null; + + for (int i = 0; i < AgentAni.AnimationList.Length; i++) + { + handlerChangeAnim = OnChangeAnim; + if (handlerChangeAnim != null) + { + handlerChangeAnim(AgentAni.AnimationList[i].AnimID, AgentAni.AnimationList[i].StartAnim, false); + } + } + + handlerChangeAnim = OnChangeAnim; + if (handlerChangeAnim != null) + { + handlerChangeAnim(UUID.Zero, false, true); + } + + return true; } private bool HandleAgentRequestSit(IClientAPI sender, Packet Pack) -- cgit v1.1