aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-05-14 09:13:31 +0200
committerMelanie2011-05-14 09:13:31 +0200
commitc4fad3d88715206b62caa2d2d01be35a817cf4a1 (patch)
tree0e867fe992ba3c0bb9db1301b68024fb55641841 /OpenSim/Region
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC_OLD-c4fad3d88715206b62caa2d2d01be35a817cf4a1.zip
opensim-SC_OLD-c4fad3d88715206b62caa2d2d01be35a817cf4a1.tar.gz
opensim-SC_OLD-c4fad3d88715206b62caa2d2d01be35a817cf4a1.tar.bz2
opensim-SC_OLD-c4fad3d88715206b62caa2d2d01be35a817cf4a1.tar.xz
Fix up a linking issue
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs19
1 files changed, 19 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 0ff3005..62eb7f7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3877,6 +3877,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3877 3877
3878 if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) 3878 if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0)
3879 return; // Fail silently if attached 3879 return; // Fail silently if attached
3880
3881 if (targetPart.ParentGroup.RootPart.OwnerID != m_host.ParentGroup.RootPart.OwnerID)
3882 return;
3883
3880 SceneObjectGroup parentPrim = null, childPrim = null; 3884 SceneObjectGroup parentPrim = null, childPrim = null;
3881 3885
3882 if (targetPart != null) 3886 if (targetPart != null)
@@ -4021,6 +4025,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4021 public void llBreakAllLinks() 4025 public void llBreakAllLinks()
4022 { 4026 {
4023 m_host.AddScriptLPS(1); 4027 m_host.AddScriptLPS(1);
4028
4029 UUID invItemID = InventorySelf();
4030
4031 TaskInventoryItem item;
4032 m_host.TaskInventory.LockItemsForRead(true);
4033 item = m_host.TaskInventory[invItemID];
4034 m_host.TaskInventory.LockItemsForRead(false);
4035
4036 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
4037 && !m_automaticLinkPermission)
4038 {
4039 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
4040 return;
4041 }
4042
4024 SceneObjectGroup parentPrim = m_host.ParentGroup; 4043 SceneObjectGroup parentPrim = m_host.ParentGroup;
4025 if (parentPrim.RootPart.AttachmentPoint != 0) 4044 if (parentPrim.RootPart.AttachmentPoint != 0)
4026 return; // Fail silently if attached 4045 return; // Fail silently if attached