diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0e21487..46eadee 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -680,7 +680,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
680 | if (m_parentGroup != null) // TODO can there be a SOP without a SOG? | 680 | if (m_parentGroup != null) // TODO can there be a SOP without a SOG? |
681 | { | 681 | { |
682 | ScenePresence avatar; | 682 | ScenePresence avatar; |
683 | if (m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar)) | 683 | if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar)) |
684 | { | 684 | { |
685 | avatar.ParentPosition = GetWorldPosition(); | 685 | avatar.ParentPosition = GetWorldPosition(); |
686 | } | 686 | } |
@@ -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) |