diff options
author | Adam Frisby | 2009-05-12 13:10:04 +0000 |
---|---|---|
committer | Adam Frisby | 2009-05-12 13:10:04 +0000 |
commit | 559355189af9432b01eef00c76071dee684a6cc0 (patch) | |
tree | 6b3585f7391689a00d3accafcafceaa440a09c58 /OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |
parent | From: Alan Webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC_OLD-559355189af9432b01eef00c76071dee684a6cc0.zip opensim-SC_OLD-559355189af9432b01eef00c76071dee684a6cc0.tar.gz opensim-SC_OLD-559355189af9432b01eef00c76071dee684a6cc0.tar.bz2 opensim-SC_OLD-559355189af9432b01eef00c76071dee684a6cc0.tar.xz |
* Applies Mantis #3630 - Adds support for outside MRM initialisation, makes MRMModule compatible with the Visual Studio MRMLoader ( http://forge.opensimulator.org/gf/project/mrmloader/ )
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs')
-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 | ||