Add ScenePresence.GetAttachments(uint attachmentPoint)
parent
b8c58e5f9f
commit
9c1c378aa1
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue