diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 |
1 files changed, 8 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 20b52b7..2b19ae1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2553,6 +2553,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2553 | 2553 | ||
2554 | if (agentID == UUID.Zero || perm == 0) // Releasing permissions | 2554 | if (agentID == UUID.Zero || perm == 0) // Releasing permissions |
2555 | { | 2555 | { |
2556 | llReleaseControls(); | ||
2557 | |||
2556 | m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero; | 2558 | m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero; |
2557 | m_host.TaskInventory[invItemID].PermsMask=0; | 2559 | m_host.TaskInventory[invItemID].PermsMask=0; |
2558 | 2560 | ||
@@ -2564,6 +2566,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2564 | return; | 2566 | return; |
2565 | } | 2567 | } |
2566 | 2568 | ||
2569 | if ( m_host.TaskInventory[invItemID].PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) | ||
2570 | llReleaseControls(); | ||
2571 | |||
2567 | m_host.AddScriptLPS(1); | 2572 | m_host.AddScriptLPS(1); |
2568 | 2573 | ||
2569 | if (m_host.ParentGroup.RootPart.IsAttachment && agent == m_host.ParentGroup.RootPart.AttachedAvatar) | 2574 | if (m_host.ParentGroup.RootPart.IsAttachment && agent == m_host.ParentGroup.RootPart.AttachedAvatar) |
@@ -2648,6 +2653,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2648 | client.OnScriptAnswer-=handleScriptAnswer; | 2653 | client.OnScriptAnswer-=handleScriptAnswer; |
2649 | m_waitingForScriptAnswer=false; | 2654 | m_waitingForScriptAnswer=false; |
2650 | 2655 | ||
2656 | if((answer & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) | ||
2657 | llReleaseControls(); | ||
2658 | |||
2651 | m_host.TaskInventory[invItemID].PermsMask=answer; | 2659 | m_host.TaskInventory[invItemID].PermsMask=answer; |
2652 | m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( | 2660 | m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( |
2653 | "run_time_permissions", new Object[] { | 2661 | "run_time_permissions", new Object[] { |