aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-27 00:42:21 -0700
committerDan Lake2011-10-27 00:42:21 -0700
commitb98613091cd6dc2f914fb5ab38ca33cdff21fc24 (patch)
tree42be01a68146870ddcd64e842a13f2fbb46b4738 /OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
parentFor now, comment out error message on new script engine console commands. (diff)
downloadopensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.zip
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.gz
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.bz2
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.xz
Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sound/SoundModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModule.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 22ffcd6..93b1005 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -70,11 +70,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
70 70
71 SceneObjectGroup grp = part.ParentGroup; 71 SceneObjectGroup grp = part.ParentGroup;
72 72
73 m_scene.ForEachScenePresence(delegate(ScenePresence sp) 73 m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
74 { 74 {
75 if (sp.IsChildAgent)
76 return;
77
78 double dis = Util.GetDistanceTo(sp.AbsolutePosition, position); 75 double dis = Util.GetDistanceTo(sp.AbsolutePosition, position);
79 if (dis > 100.0) // Max audio distance 76 if (dis > 100.0) // Max audio distance
80 return; 77 return;
@@ -122,11 +119,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
122 } 119 }
123 } 120 }
124 121
125 m_scene.ForEachScenePresence(delegate(ScenePresence sp) 122 m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
126 { 123 {
127 if (sp.IsChildAgent)
128 return;
129
130 double dis = Util.GetDistanceTo(sp.AbsolutePosition, position); 124 double dis = Util.GetDistanceTo(sp.AbsolutePosition, position);
131 if (dis > 100.0) // Max audio distance 125 if (dis > 100.0) // Max audio distance
132 return; 126 return;