diff options
author | UbitUmarov | 2019-03-08 19:14:09 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-08 19:14:09 +0000 |
commit | a32060180fd6e24c7188b24769e294146133d9a0 (patch) | |
tree | dcaf82425c74c14357ab0f0c90d2505c14d4c44c | |
parent | well let trees have special state and grass data block again. (diff) | |
download | opensim-SC-a32060180fd6e24c7188b24769e294146133d9a0.zip opensim-SC-a32060180fd6e24c7188b24769e294146133d9a0.tar.gz opensim-SC-a32060180fd6e24c7188b24769e294146133d9a0.tar.bz2 opensim-SC-a32060180fd6e24c7188b24769e294146133d9a0.tar.xz |
agent animation object ids are only for self avatar
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index fb876de..6ec87ab 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3833,24 +3833,54 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3833 | 3833 | ||
3834 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); | 3834 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); |
3835 | // TODO: don't create new blocks if recycling an old packet | 3835 | // TODO: don't create new blocks if recycling an old packet |
3836 | ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[animations.Length]; | ||
3837 | ani.Sender = new AvatarAnimationPacket.SenderBlock(); | 3836 | ani.Sender = new AvatarAnimationPacket.SenderBlock(); |
3838 | ani.Sender.ID = sourceAgentId; | 3837 | ani.Sender.ID = sourceAgentId; |
3839 | ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[animations.Length]; | 3838 | ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[animations.Length]; |
3840 | ani.PhysicalAvatarEventList = new AvatarAnimationPacket.PhysicalAvatarEventListBlock[0]; | 3839 | ani.PhysicalAvatarEventList = new AvatarAnimationPacket.PhysicalAvatarEventListBlock[0]; |
3841 | 3840 | ||
3842 | for (int i = 0; i < animations.Length; ++i) | 3841 | //self animations |
3842 | if (sourceAgentId == AgentId) | ||
3843 | { | 3843 | { |
3844 | ani.AnimationList[i] = new AvatarAnimationPacket.AnimationListBlock(); | 3844 | List<int> withobjects = new List<int>(animations.Length); |
3845 | ani.AnimationList[i].AnimID = animations[i]; | 3845 | List<int> noobjects = new List<int>(animations.Length); |
3846 | ani.AnimationList[i].AnimSequenceID = seqs[i]; | 3846 | for(int i = 0; i < animations.Length; ++i) |
3847 | { | ||
3848 | if(objectIDs[i] == sourceAgentId || objectIDs[i] == UUID.Zero) | ||
3849 | noobjects.Add(i); | ||
3850 | else | ||
3851 | withobjects.Add(i); | ||
3852 | } | ||
3847 | 3853 | ||
3848 | ani.AnimationSourceList[i] = new AvatarAnimationPacket.AnimationSourceListBlock(); | 3854 | ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[withobjects.Count]; |
3849 | if (objectIDs[i].Equals(sourceAgentId)) | 3855 | int k = 0; |
3850 | ani.AnimationSourceList[i].ObjectID = UUID.Zero; | 3856 | foreach (int i in withobjects) |
3851 | else | 3857 | { |
3852 | ani.AnimationSourceList[i].ObjectID = objectIDs[i]; | 3858 | ani.AnimationList[k] = new AvatarAnimationPacket.AnimationListBlock(); |
3859 | ani.AnimationList[k].AnimID = animations[i]; | ||
3860 | ani.AnimationList[k].AnimSequenceID = seqs[i]; | ||
3861 | ani.AnimationSourceList[k] = new AvatarAnimationPacket.AnimationSourceListBlock(); | ||
3862 | ani.AnimationSourceList[k].ObjectID = objectIDs[i]; | ||
3863 | k++; | ||
3864 | } | ||
3865 | foreach (int i in noobjects) | ||
3866 | { | ||
3867 | ani.AnimationList[k] = new AvatarAnimationPacket.AnimationListBlock(); | ||
3868 | ani.AnimationList[k].AnimID = animations[i]; | ||
3869 | ani.AnimationList[k].AnimSequenceID = seqs[i]; | ||
3870 | k++; | ||
3871 | } | ||
3872 | } | ||
3873 | else | ||
3874 | { | ||
3875 | ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[0]; | ||
3876 | for (int i = 0; i < animations.Length; ++i) | ||
3877 | { | ||
3878 | ani.AnimationList[i] = new AvatarAnimationPacket.AnimationListBlock(); | ||
3879 | ani.AnimationList[i].AnimID = animations[i]; | ||
3880 | ani.AnimationList[i].AnimSequenceID = seqs[i]; | ||
3881 | } | ||
3853 | } | 3882 | } |
3883 | |||
3854 | OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); | 3884 | OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); |
3855 | } | 3885 | } |
3856 | 3886 | ||