aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-17 22:00:56 +0000
committerMelanie Thielker2008-09-17 22:00:56 +0000
commit7e8320bada32b642058487b84af2c8355fc18292 (patch)
treee52c44d7189d9689b0d621af3f73d2b70f268703 /OpenSim/Region/ScriptEngine/Shared/Api
parentAdding currentLookAt to useragents table in SQLite. This complements the (diff)
downloadopensim-SC_OLD-7e8320bada32b642058487b84af2c8355fc18292.zip
opensim-SC_OLD-7e8320bada32b642058487b84af2c8355fc18292.tar.gz
opensim-SC_OLD-7e8320bada32b642058487b84af2c8355fc18292.tar.bz2
opensim-SC_OLD-7e8320bada32b642058487b84af2c8355fc18292.tar.xz
Kan-Ed fix series. Fix llTakeControls to behave as documented.
XEngine fixes: prevent queue overruns, prevent spamming when no key is down. Release controls when conflicting permissions are requested or permissions are refused later. Release when prim or script are deleted. Fixes Scene script instance deletion semantics.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
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[] {