diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fbb3177..339d0c4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3383,6 +3383,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
3383 | m_attachments.Add(gobj); | 3383 | m_attachments.Add(gobj); |
3384 | } | 3384 | } |
3385 | } | 3385 | } |
3386 | |||
3387 | /// <summary> | ||
3388 | /// Get the scene object attached to the given point. | ||
3389 | /// </summary> | ||
3390 | /// <param name="attachmentPoint"></param> | ||
3391 | /// <returns>Returns an empty list if there were no attachments at the point.</returns> | ||
3392 | public List<SceneObjectGroup> GetAttachments(uint attachmentPoint) | ||
3393 | { | ||
3394 | List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(); | ||
3395 | |||
3396 | lock (m_attachments) | ||
3397 | { | ||
3398 | foreach (SceneObjectGroup so in m_attachments) | ||
3399 | { | ||
3400 | if (attachmentPoint == so.RootPart.AttachmentPoint) | ||
3401 | attachments.Add(so); | ||
3402 | } | ||
3403 | } | ||
3404 | |||
3405 | return attachments; | ||
3406 | } | ||
3386 | 3407 | ||
3387 | public bool HasAttachments() | 3408 | public bool HasAttachments() |
3388 | { | 3409 | { |