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 changesarthursv
parent
7811bceb8f
commit
3219e648cc
|
@ -33,5 +33,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
|||
{
|
||||
void RegisterExtension<T>(T instance);
|
||||
void InitializeMRM(MRMBase mmb, uint localID, UUID itemID);
|
||||
void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue