mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
* 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.
This commit is contained in:
@@ -73,6 +73,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
if (!source.Configs["MRM"].GetBoolean("Hidden", false))
|
||||
{
|
||||
scene.EventManager.OnRezScript += EventManager_OnRezScript;
|
||||
scene.EventManager.OnStopScript += EventManager_OnStopScript;
|
||||
}
|
||||
|
||||
scene.EventManager.OnFrame += EventManager_OnFrame;
|
||||
@@ -90,6 +91,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
}
|
||||
}
|
||||
|
||||
void EventManager_OnStopScript(uint localID, UUID itemID)
|
||||
{
|
||||
if(m_scripts.ContainsKey(itemID))
|
||||
{
|
||||
m_scripts[itemID].Stop();
|
||||
}
|
||||
}
|
||||
|
||||
void EventManager_OnFrame()
|
||||
{
|
||||
m_microthreads.Tick(1000);
|
||||
|
||||
Reference in New Issue
Block a user