diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 3a6b1b1..e0b6150 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -108,15 +108,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
108 | try | 108 | try |
109 | { | 109 | { |
110 | m_log.Info("[MRM] Found C# MRM"); | 110 | m_log.Info("[MRM] Found C# MRM"); |
111 | IWorld m_world = new World(m_scene); | ||
112 | IHost m_host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), | ||
113 | m_microthreads); | ||
114 | 111 | ||
115 | MRMBase mmb = (MRMBase)AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap( | 112 | MRMBase mmb = (MRMBase)AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap( |
116 | CompileFromDotNetText(script, itemID.ToString()), | 113 | CompileFromDotNetText(script, itemID.ToString()), |
117 | "OpenSim.MiniModule"); | 114 | "OpenSim.MiniModule"); |
118 | m_log.Info("[MRM] Created MRM Instance"); | 115 | |
119 | mmb.InitMiniModule(m_world, m_host, itemID); | 116 | InitializeMRM(mmb, localID, itemID); |
117 | |||
120 | m_scripts[itemID] = mmb; | 118 | m_scripts[itemID] = mmb; |
121 | 119 | ||
122 | m_log.Info("[MRM] Starting MRM"); | 120 | m_log.Info("[MRM] Starting MRM"); |
@@ -148,6 +146,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
148 | } | 146 | } |
149 | } | 147 | } |
150 | 148 | ||
149 | public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID) | ||
150 | { | ||
151 | |||
152 | m_log.Info("[MRM] Created MRM Instance"); | ||
153 | |||
154 | IWorld m_world = new World(m_scene); | ||
155 | IHost m_host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), | ||
156 | m_microthreads); | ||
157 | |||
158 | mmb.InitMiniModule(m_world, m_host, itemID); | ||
159 | |||
160 | } | ||
161 | |||
151 | public void PostInitialise() | 162 | public void PostInitialise() |
152 | { | 163 | { |
153 | 164 | ||