Continuation of previous checkin. Found more places where ForEachScenePresence can be changed to ForEachRootScenePresence.

This commit is contained in:
Dan Lake
2011-10-27 01:25:12 -07:00
parent b98613091c
commit 06577d7299
4 changed files with 39 additions and 57 deletions

View File

@@ -2598,19 +2598,15 @@ namespace OpenSim.Region.Framework.Scenes
public void SendOtherAgentsAvatarDataToMe()
{
int count = 0;
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
{
// only send information about root agents
if (scenePresence.IsChildAgent)
return;
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
{
// only send information about other root agents
if (scenePresence.UUID == UUID)
return;
// only send information about other root agents
if (scenePresence.UUID == UUID)
return;
scenePresence.SendAvatarDataToAgent(this);
count++;
});
scenePresence.SendAvatarDataToAgent(this);
count++;
});
m_scene.StatsReporter.AddAgentUpdates(count);
}
@@ -2644,13 +2640,14 @@ namespace OpenSim.Region.Framework.Scenes
int count = 0;
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
{
if (scenePresence.UUID == UUID)
return;
{
// only send information to other root agents
if (scenePresence.UUID == UUID)
return;
SendAppearanceToAgent(scenePresence);
count++;
});
SendAppearanceToAgent(scenePresence);
count++;
});
m_scene.StatsReporter.AddAgentUpdates(count);
}
@@ -2664,19 +2661,15 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID);
int count = 0;
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
{
// only send information about root agents
if (scenePresence.IsChildAgent)
return;
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
{
// only send information about other root agents
if (scenePresence.UUID == UUID)
return;
// only send information about other root agents
if (scenePresence.UUID == UUID)
return;
scenePresence.SendAppearanceToAgent(this);
count++;
});
scenePresence.SendAppearanceToAgent(this);
count++;
});
m_scene.StatsReporter.AddAgentUpdates(count);
}