aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 2f90c16..4e20d95 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -43,6 +43,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
43 base.m_scriptEngine = scriptEngine; 43 base.m_scriptEngine = scriptEngine;
44 44
45 } 45 }
46 private Compiler.LSL.Compiler LSLCompiler;
47
48
49 public override void Initialize()
50 {
51 // Create our compiler
52 LSLCompiler = new Compiler.LSL.Compiler(m_scriptEngine);
53 }
46 54
47 // KEEP TRACK OF SCRIPTS <int id, whatever script> 55 // KEEP TRACK OF SCRIPTS <int id, whatever script>
48 //internal Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>>(); 56 //internal Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>>();
@@ -50,17 +58,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
50 // UNLOAD SCRIPT 58 // UNLOAD SCRIPT
51 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim 59 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim
52 60
53 private Compiler.LSL.Compiler LSLCompiler;
54 61
55 public override void _StartScript(uint localID, LLUUID itemID, string Script) 62 public override void _StartScript(uint localID, LLUUID itemID, string Script)
56 { 63 {
57 m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); 64 m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID);
58 65
59 // First time start? Lets fire up our compiler...
60 if (LSLCompiler == null)
61 {
62 LSLCompiler = new Compiler.LSL.Compiler(m_scriptEngine);
63 }
64 66
65 //IScriptHost root = host.GetRoot(); 67 //IScriptHost root = host.GetRoot();
66 68
@@ -118,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
118 catch (Exception e2) 120 catch (Exception e2)
119 { 121 {
120 m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Error displaying error in-world: " + e2.ToString()); 122 m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Error displaying error in-world: " + e2.ToString());
121 m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, 123 m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName,
122 "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); 124 "Errormessage: Error compiling script:\r\n" + e.Message.ToString());
123 } 125 }
124 } 126 }