aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-19 21:37:12 +0000
committerMelanie Thielker2008-08-19 21:37:12 +0000
commitf2055a35246a991fd73240789f4354d200ac6cc8 (patch)
tree8e7c36cd668420ba571796c76774b186c7494e50 /OpenSim/Region/ScriptEngine/Shared
parentAdd the default region texture UUIDS back in that were lost in (diff)
downloadopensim-SC-f2055a35246a991fd73240789f4354d200ac6cc8.zip
opensim-SC-f2055a35246a991fd73240789f4354d200ac6cc8.tar.gz
opensim-SC-f2055a35246a991fd73240789f4354d200ac6cc8.tar.bz2
opensim-SC-f2055a35246a991fd73240789f4354d200ac6cc8.tar.xz
Mantis #2001
Thank you, nlin, for a patch that implements part of llCreateLink - DotNetEngine implementation by nlin. - Shared/ port by me.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 4de207a..3d68121 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2768,7 +2768,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2768 public void llCreateLink(string target, int parent) 2768 public void llCreateLink(string target, int parent)
2769 { 2769 {
2770 m_host.AddScriptLPS(1); 2770 m_host.AddScriptLPS(1);
2771 NotImplemented("llCreateLink"); 2771 LLUUID invItemID = InventorySelf();
2772 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2773 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2774 return;
2775 }
2776 IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient;
2777 SceneObjectPart targetPart = World.GetSceneObjectPart(target);
2778 SceneObjectGroup parentPrim = null, childPrim = null;
2779 if (targetPart != null)
2780 {
2781 if (parent == BuiltIn_Commands_BaseClass.TRUE) {
2782 parentPrim = m_host.ParentGroup;
2783 childPrim = targetPart.ParentGroup;
2784 }
2785 else
2786 {
2787 parentPrim = targetPart.ParentGroup;
2788 childPrim = m_host.ParentGroup;
2789 }
2790 byte uf = childPrim.RootPart.UpdateFlag;
2791 childPrim.RootPart.UpdateFlag = 0;
2792 parentPrim.LinkToGroup(childPrim);
2793 childPrim.RootPart.UpdateFlag = uf;
2794 }
2795 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2796 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected);
2797 parentPrim.GetProperties(client);
2798
2799 // sleep for 1 second
2800 System.Threading.Thread.Sleep(1000);
2801
2772 } 2802 }
2773 2803
2774 public void llBreakLink(int linknum) 2804 public void llBreakLink(int linknum)