Implementation of new LSL function: list llGetAttachedList(key avatar); It also returns HUDs' keys.
Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com> Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>melanie
parent
d2e380e81e
commit
b0f87fba1c
|
@ -7022,6 +7022,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return m_host.ParentGroup.AttachmentPoint;
|
return m_host.ParentGroup.AttachmentPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_List llGetAttachedList(string id)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
LSL_List AttachmentsList = new LSL_List();
|
||||||
|
|
||||||
|
ScenePresence av = World.GetScenePresence((UUID)id);
|
||||||
|
|
||||||
|
string NOT_FOUND = "NOT_FOUND";
|
||||||
|
string NOT_ON_REGION = "NOT ON REGION";
|
||||||
|
|
||||||
|
if (av == null)
|
||||||
|
return new LSL_List(NOT_FOUND);
|
||||||
|
if (av.IsChildAgent)
|
||||||
|
return new LSL_List(NOT_ON_REGION);
|
||||||
|
|
||||||
|
List<SceneObjectGroup> AttachmentsKeys;
|
||||||
|
|
||||||
|
AttachmentsKeys = av.GetAttachments();
|
||||||
|
|
||||||
|
foreach (SceneObjectGroup AttachmentKey in AttachmentsKeys)
|
||||||
|
AttachmentsList.Add(new LSL_Key(AttachmentKey.FromItemID.ToString()));
|
||||||
|
|
||||||
|
return AttachmentsList;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual LSL_Integer llGetFreeMemory()
|
public virtual LSL_Integer llGetFreeMemory()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
|
@ -116,6 +116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String llGetAnimation(string id);
|
LSL_String llGetAnimation(string id);
|
||||||
LSL_List llGetAnimationList(string id);
|
LSL_List llGetAnimationList(string id);
|
||||||
LSL_Integer llGetAttached();
|
LSL_Integer llGetAttached();
|
||||||
|
LSL_List llGetAttachedList(string id);
|
||||||
LSL_List llGetBoundingBox(string obj);
|
LSL_List llGetBoundingBox(string obj);
|
||||||
LSL_Vector llGetCameraPos();
|
LSL_Vector llGetCameraPos();
|
||||||
LSL_Rotation llGetCameraRot();
|
LSL_Rotation llGetCameraRot();
|
||||||
|
|
|
@ -426,6 +426,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_LSL_Functions.llGetAttached();
|
return m_LSL_Functions.llGetAttached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_List llGetAttachedList(string id)
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetAttachedList(id);
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_List llGetBoundingBox(string obj)
|
public LSL_List llGetBoundingBox(string obj)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llGetBoundingBox(obj);
|
return m_LSL_Functions.llGetBoundingBox(obj);
|
||||||
|
|
Loading…
Reference in New Issue