diff options
author | Melanie | 2009-08-07 19:04:20 +0100 |
---|---|---|
committer | Melanie | 2009-08-07 19:04:20 +0100 |
commit | 3219e648ccee074e28135430afe2d26a7cf53c9e (patch) | |
tree | 7e2bc044c0af792b70341af5c1068d7ff18af338 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-3219e648ccee074e28135430afe2d26a7cf53c9e.zip opensim-SC_OLD-3219e648ccee074e28135430afe2d26a7cf53c9e.tar.gz opensim-SC_OLD-3219e648ccee074e28135430afe2d26a7cf53c9e.tar.bz2 opensim-SC_OLD-3219e648ccee074e28135430afe2d26a7cf53c9e.tar.xz |
From: Snowcrash <Snowcrash.short@gmail.com>
Date: Wed, 5 Aug 2009 12:45:56 +0200
Subject: [PATCH] A few minor tweaks to the MRM API's in order to make it possible for MRM's to run in a separate AppDomain without poluting the primary appdomain of OpenSim
Specifically:
Added an explicit method for getting the "globals" of the MRM, removing the need to have the MRM script code loaded into the primary domain, in order to set up proxies
Added a [Serializable] attribute to TouchEventArgs, again in order to remove the need to have MRM script code loaded into the primary domain.
---------
Applied with whitespace changes
Diffstat (limited to 'OpenSim/Region')
3 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IMRMModule.cs index 9f48081..e957a62 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 | |||
33 | { | 33 | { |
34 | void RegisterExtension<T>(T instance); | 34 | void RegisterExtension<T>(T instance); |
35 | void InitializeMRM(MRMBase mmb, uint localID, UUID itemID); | 35 | void InitializeMRM(MRMBase mmb, uint localID, UUID itemID); |
36 | void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host); | ||
36 | } | 37 | } |
37 | } | 38 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index f45df48..6415250 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; | |||
32 | 32 | ||
33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
34 | { | 34 | { |
35 | [Serializable] | ||
35 | public class TouchEventArgs : EventArgs | 36 | public class TouchEventArgs : EventArgs |
36 | { | 37 | { |
37 | public IAvatar Avatar; | 38 | public IAvatar Avatar; |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index eb807f2..6a15a33 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 | |||
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) | ||
168 | { | ||
169 | world = new World(m_scene); | ||
170 | host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), m_microthreads); | ||
171 | } | ||
172 | |||
167 | public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID) | 173 | public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID) |
168 | { | 174 | { |
169 | 175 | ||
170 | m_log.Info("[MRM] Created MRM Instance"); | 176 | m_log.Info("[MRM] Created MRM Instance"); |
171 | 177 | ||
172 | IWorld m_world = new World(m_scene); | 178 | IWorld world; |
173 | IHost m_host = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions), | 179 | IHost host; |
174 | m_microthreads); | 180 | |
181 | GetGlobalEnvironment(localID, out world, out host); | ||
175 | 182 | ||
176 | mmb.InitMiniModule(m_world, m_host, itemID); | 183 | mmb.InitMiniModule(world, host, itemID); |
177 | } | 184 | } |
178 | 185 | ||
179 | public void PostInitialise() | 186 | public void PostInitialise() |