diff options
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 19 |
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 |