diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0e21487..88bdf31 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1321,11 +1321,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1321 | if (volume < 0) | 1321 | if (volume < 0) |
1322 | volume = 0; | 1322 | volume = 0; |
1323 | 1323 | ||
1324 | List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); | 1324 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) |
1325 | foreach (ScenePresence p in avatarts) | ||
1326 | { | 1325 | { |
1327 | p.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); | 1326 | if(!sp.IsChildAgent) |
1328 | } | 1327 | sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); |
1328 | }); | ||
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | /// <summary> | 1331 | /// <summary> |
@@ -2609,12 +2609,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2609 | } | 2609 | } |
2610 | } | 2610 | } |
2611 | 2611 | ||
2612 | List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); | 2612 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) |
2613 | foreach (ScenePresence p in avatarts) | ||
2614 | { | 2613 | { |
2615 | if (!(Util.GetDistanceTo(p.AbsolutePosition, AbsolutePosition) >= 100)) | 2614 | if (sp.IsChildAgent) |
2616 | p.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | 2615 | return; |
2617 | } | 2616 | if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100)) |
2617 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | ||
2618 | }); | ||
2618 | } | 2619 | } |
2619 | 2620 | ||
2620 | public void RemFlag(PrimFlags flag) | 2621 | public void RemFlag(PrimFlags flag) |