Add ScenePresence.GetAttachments(uint attachmentPoint)
parent
b8c58e5f9f
commit
9c1c378aa1
|
@ -3383,6 +3383,27 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_attachments.Add(gobj);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue