From 54a5b6f4344275342177f6b3c9a2662909dd763a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 12 Apr 2010 12:36:06 -0700 Subject: [PATCH] Reduce number of AvatarAnimations sent with large number of avatars --- .../Scenes/Animation/ScenePresenceAnimator.cs | 13 +++++++------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 7307662b2a..de4c5fb053 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -419,11 +419,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation if (m_scenePresence.IsChildAgent) return; - m_scenePresence.Scene.ForEachScenePresence( - delegate(ScenePresence SP) - { - SP.Animator.SendAnimPack(); - }); + UUID[] animIDs; + int[] sequenceNums; + UUID[] objectIDs; + + m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs); + client.SendAnimations(animIDs, sequenceNums, m_scenePresence.ControllingClient.AgentId, objectIDs); } /// @@ -451,4 +452,4 @@ namespace OpenSim.Region.Framework.Scenes.Animation m_scenePresence = null; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b5f621721a..3efb45fa87 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -912,6 +912,7 @@ namespace OpenSim.Region.Framework.Scenes m_isChildAgent = false; + // send the animations of the other presences to me m_scene.ForEachScenePresence(delegate(ScenePresence presence) { if (presence != this)