diff options
author | Justin Clark-Casey (justincc) | 2010-08-31 22:16:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-31 22:16:23 +0100 |
commit | 9c1c378aa1b8c4f7738514614cdf8e8b870e7263 (patch) | |
tree | 75cfe0e4342eda279ef10b2c6fc638f4f2dda429 | |
parent | reinsert functionality to debug log more levels of incoming and outgoing clie... (diff) | |
download | opensim-SC_OLD-9c1c378aa1b8c4f7738514614cdf8e8b870e7263.zip opensim-SC_OLD-9c1c378aa1b8c4f7738514614cdf8e8b870e7263.tar.gz opensim-SC_OLD-9c1c378aa1b8c4f7738514614cdf8e8b870e7263.tar.bz2 opensim-SC_OLD-9c1c378aa1b8c4f7738514614cdf8e8b870e7263.tar.xz |
Add ScenePresence.GetAttachments(uint attachmentPoint)
-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 | { |