diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2661dc3..b3e7d67 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -957,14 +957,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
957 | 957 | ||
958 | m_isChildAgent = false; | 958 | m_isChildAgent = false; |
959 | 959 | ||
960 | ScenePresence[] animAgents = m_scene.GetScenePresences(); | 960 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) |
961 | for (int i = 0; i < animAgents.Length; i++) | ||
962 | { | 961 | { |
963 | ScenePresence presence = animAgents[i]; | ||
964 | |||
965 | if (presence != this) | 962 | if (presence != this) |
966 | presence.Animator.SendAnimPackToClient(ControllingClient); | 963 | presence.Animator.SendAnimPackToClient(ControllingClient); |
967 | } | 964 | }); |
968 | 965 | ||
969 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 966 | m_scene.EventManager.TriggerOnMakeRootAgent(this); |
970 | } | 967 | } |
@@ -2666,13 +2663,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2666 | public void SendInitialFullUpdateToAllClients() | 2663 | public void SendInitialFullUpdateToAllClients() |
2667 | { | 2664 | { |
2668 | m_perfMonMS = Util.EnvironmentTickCount(); | 2665 | m_perfMonMS = Util.EnvironmentTickCount(); |
2669 | 2666 | int avUpdates = 0; | |
2670 | ScenePresence[] avatars = m_scene.GetScenePresences(); | 2667 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
2671 | |||
2672 | for (int i = 0; i < avatars.Length; i++) | ||
2673 | { | 2668 | { |
2674 | ScenePresence avatar = avatars[i]; | 2669 | ++avUpdates; |
2675 | |||
2676 | // only send if this is the root (children are only "listening posts" in a foreign region) | 2670 | // only send if this is the root (children are only "listening posts" in a foreign region) |
2677 | if (!IsChildAgent) | 2671 | if (!IsChildAgent) |
2678 | { | 2672 | { |
@@ -2688,9 +2682,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2688 | avatar.Animator.SendAnimPackToClient(ControllingClient); | 2682 | avatar.Animator.SendAnimPackToClient(ControllingClient); |
2689 | } | 2683 | } |
2690 | } | 2684 | } |
2691 | } | 2685 | }); |
2692 | 2686 | ||
2693 | m_scene.StatsReporter.AddAgentUpdates(avatars.Length); | 2687 | m_scene.StatsReporter.AddAgentUpdates(avUpdates); |
2694 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2688 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2695 | 2689 | ||
2696 | //Animator.SendAnimPack(); | 2690 | //Animator.SendAnimPack(); |