Add ScenePresence.GetAttachments(uint attachmentPoint)

prebuild-update
Justin Clark-Casey (justincc) 2010-08-31 22:16:23 +01:00
parent b8c58e5f9f
commit 9c1c378aa1
1 changed files with 21 additions and 0 deletions

View File

@ -3384,6 +3384,27 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
/// <summary>
/// Get the scene object attached to the given point.
/// </summary>
/// <param name="attachmentPoint"></param>
/// <returns>Returns an empty list if there were no attachments at the point.</returns>
public List<SceneObjectGroup> GetAttachments(uint attachmentPoint)
{
List<SceneObjectGroup> attachments = new List<SceneObjectGroup>();
lock (m_attachments)
{
foreach (SceneObjectGroup so in m_attachments)
{
if (attachmentPoint == so.RootPart.AttachmentPoint)
attachments.Add(so);
}
}
return attachments;
}
public bool HasAttachments() public bool HasAttachments()
{ {
return m_attachments.Count > 0; return m_attachments.Count > 0;