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

@@ -1440,10 +1440,9 @@ namespace OpenSim.Region.Framework.Scenes
if (volume < 0)
volume = 0;
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (!sp.IsChildAgent)
sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
});
}
@@ -2676,10 +2675,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.IsChildAgent)
return;
if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
});