From c534d7f614ae5ba15dee80ccefcf8e4741f5297b Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 9 May 2009 17:44:12 +0000 Subject: * Code to make MRM debugging easier. --- OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | 3 ++- OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Scripting') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index 73eb98f..3a6b1b1 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs @@ -142,7 +142,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule m_scene.Broadcast(delegate(IClientAPI user) { user.SendAlertMessage( - "MiniRegionModule Compilation and Initialisation failed: " + e); + "Compile error while building MRM script, check OpenSim console for more information."); }); } } @@ -256,6 +256,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule } libraries.Add("OpenSim.Region.OptionalModules.dll"); + libraries.Add("OpenMetaverseTypes.dll"); libraries.Add("log4net.dll"); foreach (string library in libraries) diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs index 8fd77ee..aaa2848 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs @@ -28,7 +28,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using System.Text; +using log4net; using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule @@ -54,8 +56,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule while (m_threads.Count > 0 && i < count) { i++; + bool running = m_threads[i%m_threads.Count].MoveNext(); + if (!running) m_threads.Remove(m_threads[i%m_threads.Count]); } -- cgit v1.1