aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2010-03-30 21:34:27 +0100
committerMelanie2010-03-30 21:34:27 +0100
commit5693870fe26fae35a28f2d5103780434f4f40e57 (patch)
tree0e070fb6f11ab8763ac4f1f9a851a0061101d4d6 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentminor: commented out code removal (diff)
downloadopensim-SC_OLD-5693870fe26fae35a28f2d5103780434f4f40e57.zip
opensim-SC_OLD-5693870fe26fae35a28f2d5103780434f4f40e57.tar.gz
opensim-SC_OLD-5693870fe26fae35a28f2d5103780434f4f40e57.tar.bz2
opensim-SC_OLD-5693870fe26fae35a28f2d5103780434f4f40e57.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 539f2b1..4b2641c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -682,7 +682,7 @@ namespace OpenSim.Region.Framework.Scenes
682 if (m_parentGroup != null) // TODO can there be a SOP without a SOG? 682 if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
683 { 683 {
684 ScenePresence avatar; 684 ScenePresence avatar;
685 if (m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar)) 685 if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
686 { 686 {
687 avatar.ParentPosition = GetWorldPosition(); 687 avatar.ParentPosition = GetWorldPosition();
688 } 688 }
@@ -1332,11 +1332,11 @@ namespace OpenSim.Region.Framework.Scenes
1332 if (volume < 0) 1332 if (volume < 0)
1333 volume = 0; 1333 volume = 0;
1334 1334
1335 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); 1335 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
1336 foreach (ScenePresence p in avatarts)
1337 { 1336 {
1338 p.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); 1337 if(!sp.IsChildAgent)
1339 } 1338 sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
1339 });
1340 } 1340 }
1341 1341
1342 /// <summary> 1342 /// <summary>
@@ -2626,12 +2626,13 @@ namespace OpenSim.Region.Framework.Scenes
2626 TaskInventory.LockItemsForRead(false); 2626 TaskInventory.LockItemsForRead(false);
2627 } 2627 }
2628 2628
2629 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); 2629 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
2630 foreach (ScenePresence p in avatarts)
2631 { 2630 {
2632 if (!(Util.GetDistanceTo(p.AbsolutePosition, AbsolutePosition) >= 100)) 2631 if (sp.IsChildAgent)
2633 p.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); 2632 return;
2634 } 2633 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
2634 sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
2635 });
2635 } 2636 }
2636 2637
2637 public void RemFlag(PrimFlags flag) 2638 public void RemFlag(PrimFlags flag)