diff options
Diffstat (limited to 'OpenSim/Region')
3 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 6355669..361a0b9 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
68 | void SetMinEventDelay(UUID itemID, double delay); | 68 | void SetMinEventDelay(UUID itemID, double delay); |
69 | int GetStartParameter(UUID itemID); | 69 | int GetStartParameter(UUID itemID); |
70 | 70 | ||
71 | void SetScriptState(UUID itemID, bool state); | 71 | void SetScriptState(UUID itemID, bool state, bool self); |
72 | bool GetScriptState(UUID itemID); | 72 | bool GetScriptState(UUID itemID); |
73 | void SetState(UUID itemID, string newState); | 73 | void SetState(UUID itemID, string newState); |
74 | void ApiResetScript(UUID itemID); | 74 | void ApiResetScript(UUID itemID); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bafee28..af04951 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -521,7 +521,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
521 | 521 | ||
522 | if ((item = GetScriptByName(name)) != UUID.Zero) | 522 | if ((item = GetScriptByName(name)) != UUID.Zero) |
523 | { | 523 | { |
524 | m_ScriptEngine.SetScriptState(item, run == 0 ? false : true); | 524 | m_ScriptEngine.SetScriptState(item, run == 0 ? false : true, item == m_item.ItemID); |
525 | } | 525 | } |
526 | else | 526 | else |
527 | { | 527 | { |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e12f850..7822df9 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1854,15 +1854,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1854 | return instance; | 1854 | return instance; |
1855 | } | 1855 | } |
1856 | 1856 | ||
1857 | public void SetScriptState(UUID itemID, bool running) | 1857 | public void SetScriptState(UUID itemID, bool running, bool self) |
1858 | { | 1858 | { |
1859 | IScriptInstance instance = GetInstance(itemID); | 1859 | IScriptInstance instance = GetInstance(itemID); |
1860 | if (instance != null) | 1860 | if (instance != null) |
1861 | { | 1861 | { |
1862 | if (running) | 1862 | if (running) |
1863 | instance.Start(); | 1863 | instance.Start(); |
1864 | else | 1864 | else |
1865 | instance.Stop(100); | 1865 | { |
1866 | if(self) | ||
1867 | { | ||
1868 | instance.Running = false; | ||
1869 | throw new EventAbortException(); | ||
1870 | } | ||
1871 | else | ||
1872 | instance.Stop(100); | ||
1873 | } | ||
1866 | } | 1874 | } |
1867 | } | 1875 | } |
1868 | 1876 | ||