aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMandarinka Tasty2016-11-04 06:24:56 +0100
committerUbitUmarov2016-11-04 10:55:11 +0000
commitb0f87fba1c4238a042a0b7112d792815dd10b737 (patch)
tree7eada1233958b32c46a2df027ac88438cc1892fb /OpenSim/Region/ScriptEngine
parenton get asset with callback, do the callback even if asset not found. This is ... (diff)
downloadopensim-SC-b0f87fba1c4238a042a0b7112d792815dd10b737.zip
opensim-SC-b0f87fba1c4238a042a0b7112d792815dd10b737.tar.gz
opensim-SC-b0f87fba1c4238a042a0b7112d792815dd10b737.tar.bz2
opensim-SC-b0f87fba1c4238a042a0b7112d792815dd10b737.tar.xz
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>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
3 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 85837e4..5f87347 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7022,6 +7022,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7022 return m_host.ParentGroup.AttachmentPoint; 7022 return m_host.ParentGroup.AttachmentPoint;
7023 } 7023 }
7024 7024
7025 public LSL_List llGetAttachedList(string id)
7026 {
7027 m_host.AddScriptLPS(1);
7028
7029 LSL_List AttachmentsList = new LSL_List();
7030
7031 ScenePresence av = World.GetScenePresence((UUID)id);
7032
7033 string NOT_FOUND = "NOT_FOUND";
7034 string NOT_ON_REGION = "NOT ON REGION";
7035
7036 if (av == null)
7037 return new LSL_List(NOT_FOUND);
7038 if (av.IsChildAgent)
7039 return new LSL_List(NOT_ON_REGION);
7040
7041 List<SceneObjectGroup> AttachmentsKeys;
7042
7043 AttachmentsKeys = av.GetAttachments();
7044
7045 foreach (SceneObjectGroup AttachmentKey in AttachmentsKeys)
7046 AttachmentsList.Add(new LSL_Key(AttachmentKey.FromItemID.ToString()));
7047
7048 return AttachmentsList;
7049 }
7050
7025 public virtual LSL_Integer llGetFreeMemory() 7051 public virtual LSL_Integer llGetFreeMemory()
7026 { 7052 {
7027 m_host.AddScriptLPS(1); 7053 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 8b8638c..3d1482d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -116,6 +116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
116 LSL_String llGetAnimation(string id); 116 LSL_String llGetAnimation(string id);
117 LSL_List llGetAnimationList(string id); 117 LSL_List llGetAnimationList(string id);
118 LSL_Integer llGetAttached(); 118 LSL_Integer llGetAttached();
119 LSL_List llGetAttachedList(string id);
119 LSL_List llGetBoundingBox(string obj); 120 LSL_List llGetBoundingBox(string obj);
120 LSL_Vector llGetCameraPos(); 121 LSL_Vector llGetCameraPos();
121 LSL_Rotation llGetCameraRot(); 122 LSL_Rotation llGetCameraRot();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index cea66d2..2769712 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -426,6 +426,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
426 return m_LSL_Functions.llGetAttached(); 426 return m_LSL_Functions.llGetAttached();
427 } 427 }
428 428
429 public LSL_List llGetAttachedList(string id)
430 {
431 return m_LSL_Functions.llGetAttachedList(id);
432 }
433
429 public LSL_List llGetBoundingBox(string obj) 434 public LSL_List llGetBoundingBox(string obj)
430 { 435 {
431 return m_LSL_Functions.llGetBoundingBox(obj); 436 return m_LSL_Functions.llGetBoundingBox(obj);