aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
2 files changed, 32 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8fb6c3b..d94d5ef 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4811,6 +4811,18 @@ namespace OpenSim.Region.Framework.Scenes
4811 } 4811 }
4812 4812
4813 /// <summary> 4813 /// <summary>
4814 /// Attempt to get the SOG via its UUID
4815 /// </summary>
4816 /// <param name="fullID"></param>
4817 /// <param name="sog"></param>
4818 /// <returns></returns>
4819 public bool TryGetSceneObjectGroup(UUID fullID, out SceneObjectGroup sog)
4820 {
4821 sog = GetSceneObjectGroup(fullID);
4822 return sog != null;
4823 }
4824
4825 /// <summary>
4814 /// Get a prim by name from the scene (will return the first 4826 /// Get a prim by name from the scene (will return the first
4815 /// found, if there are more than one prim with the same name) 4827 /// found, if there are more than one prim with the same name)
4816 /// </summary> 4828 /// </summary>
@@ -4842,6 +4854,18 @@ namespace OpenSim.Region.Framework.Scenes
4842 } 4854 }
4843 4855
4844 /// <summary> 4856 /// <summary>
4857 /// Attempt to get a prim via its UUID
4858 /// </summary>
4859 /// <param name="fullID"></param>
4860 /// <param name="sop"></param>
4861 /// <returns></returns>
4862 public bool TryGetSceneObjectPart(UUID fullID, out SceneObjectPart sop)
4863 {
4864 sop = GetSceneObjectPart(fullID);
4865 return sop != null;
4866 }
4867
4868 /// <summary>
4845 /// Get a scene object group that contains the prim with the given local id 4869 /// Get a scene object group that contains the prim with the given local id
4846 /// </summary> 4870 /// </summary>
4847 /// <param name="localID"></param> 4871 /// <param name="localID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3e8c7e5..0176921 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3631,13 +3631,16 @@ namespace OpenSim.Region.Framework.Scenes
3631 public List<SceneObjectGroup> GetAttachments(uint attachmentPoint) 3631 public List<SceneObjectGroup> GetAttachments(uint attachmentPoint)
3632 { 3632 {
3633 List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(); 3633 List<SceneObjectGroup> attachments = new List<SceneObjectGroup>();
3634 3634
3635 lock (m_attachments) 3635 if (attachmentPoint >= 0)
3636 { 3636 {
3637 foreach (SceneObjectGroup so in m_attachments) 3637 lock (m_attachments)
3638 { 3638 {
3639 if (attachmentPoint == so.AttachmentPoint) 3639 foreach (SceneObjectGroup so in m_attachments)
3640 attachments.Add(so); 3640 {
3641 if (attachmentPoint == so.AttachmentPoint)
3642 attachments.Add(so);
3643 }
3641 } 3644 }
3642 } 3645 }
3643 3646