diff options
author | Adam Frisby | 2009-08-07 14:17:51 +1000 |
---|---|---|
committer | Adam Frisby | 2009-08-07 14:17:51 +1000 |
commit | 270ae50d700831ac996025045dc32341d68ee0f9 (patch) | |
tree | 590006ed8571195275f4bfce26fb6131a4b30d94 /OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |
parent | Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-270ae50d700831ac996025045dc32341d68ee0f9.zip opensim-SC-270ae50d700831ac996025045dc32341d68ee0f9.tar.gz opensim-SC-270ae50d700831ac996025045dc32341d68ee0f9.tar.bz2 opensim-SC-270ae50d700831ac996025045dc32341d68ee0f9.tar.xz |
* Implements MRM's Stop() interface member.
* MRM Scripts should do appropriate cleanup within this event, to allow for clean shutdowns and script updates. This means unbinding from events you are listening to, and releasing any resources.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 53145e2..eb807f2 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -73,6 +73,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
73 | if (!source.Configs["MRM"].GetBoolean("Hidden", false)) | 73 | if (!source.Configs["MRM"].GetBoolean("Hidden", false)) |
74 | { | 74 | { |
75 | scene.EventManager.OnRezScript += EventManager_OnRezScript; | 75 | scene.EventManager.OnRezScript += EventManager_OnRezScript; |
76 | scene.EventManager.OnStopScript += EventManager_OnStopScript; | ||
76 | } | 77 | } |
77 | 78 | ||
78 | scene.EventManager.OnFrame += EventManager_OnFrame; | 79 | scene.EventManager.OnFrame += EventManager_OnFrame; |
@@ -90,6 +91,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
94 | void EventManager_OnStopScript(uint localID, UUID itemID) | ||
95 | { | ||
96 | if(m_scripts.ContainsKey(itemID)) | ||
97 | { | ||
98 | m_scripts[itemID].Stop(); | ||
99 | } | ||
100 | } | ||
101 | |||
93 | void EventManager_OnFrame() | 102 | void EventManager_OnFrame() |
94 | { | 103 | { |
95 | m_microthreads.Tick(1000); | 104 | m_microthreads.Tick(1000); |