aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
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/Common
parentAdd the default region texture UUIDS back in that were lost in (diff)
downloadopensim-SC_OLD-f2055a35246a991fd73240789f4354d200ac6cc8.zip
opensim-SC_OLD-f2055a35246a991fd73240789f4354d200ac6cc8.tar.gz
opensim-SC_OLD-f2055a35246a991fd73240789f4354d200ac6cc8.tar.bz2
opensim-SC_OLD-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/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 9195063..3823ff8 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2781,7 +2781,37 @@ namespace OpenSim.Region.ScriptEngine.Common
2781 public void llCreateLink(string target, int parent) 2781 public void llCreateLink(string target, int parent)
2782 { 2782 {
2783 m_host.AddScriptLPS(1); 2783 m_host.AddScriptLPS(1);
2784 NotImplemented("llCreateLink"); 2784 LLUUID invItemID = InventorySelf();
2785 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2786 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2787 return;
2788 }
2789 IClientAPI client = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter).ControllingClient;
2790 SceneObjectPart targetPart = World.GetSceneObjectPart(target);
2791 SceneObjectGroup parentPrim = null, childPrim = null;
2792 if (targetPart != null)
2793 {
2794 if (parent == BuiltIn_Commands_BaseClass.TRUE) {
2795 parentPrim = m_host.ParentGroup;
2796 childPrim = targetPart.ParentGroup;
2797 }
2798 else
2799 {
2800 parentPrim = targetPart.ParentGroup;
2801 childPrim = m_host.ParentGroup;
2802 }
2803 byte uf = childPrim.RootPart.UpdateFlag;
2804 childPrim.RootPart.UpdateFlag = 0;
2805 parentPrim.LinkToGroup(childPrim);
2806 childPrim.RootPart.UpdateFlag = uf;
2807 }
2808 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2809 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected);
2810 parentPrim.GetProperties(client);
2811
2812 // sleep for 1 second
2813 System.Threading.Thread.Sleep(1000);
2814
2785 } 2815 }
2786 2816
2787 public void llBreakLink(int linknum) 2817 public void llBreakLink(int linknum)