diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs index 9f48081dea..e957a62119 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs @@ -33,5 +33,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { void RegisterExtension(T instance); void InitializeMRM(MRMBase mmb, uint localID, UUID itemID); + void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host); } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index f45df484d8..64152505c3 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -32,6 +32,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { + [Serializable] public class TouchEventArgs : EventArgs { public IAvatar Avatar; diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index eb807f262c..6a15a3314f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs @@ -164,16 +164,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule } } + public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) + { + world = new World(m_scene); + host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), m_microthreads); + } + public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID) { m_log.Info("[MRM] Created MRM Instance"); - IWorld m_world = new World(m_scene); - IHost m_host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), - m_microthreads); + IWorld world; + IHost host; - mmb.InitMiniModule(m_world, m_host, itemID); + GetGlobalEnvironment(localID, out world, out host); + + mmb.InitMiniModule(world, host, itemID); } public void PostInitialise()