diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 8030a32..f6c9e30 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -49,13 +49,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
49 | // UNLOAD SCRIPT | 49 | // UNLOAD SCRIPT |
50 | // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim | 50 | // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim |
51 | 51 | ||
52 | private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler(); | 52 | private Compiler.LSL.Compiler LSLCompiler; |
53 | 53 | ||
54 | public override void _StartScript(uint localID, LLUUID itemID, string Script) | 54 | public override void _StartScript(uint localID, LLUUID itemID, string Script) |
55 | { | 55 | { |
56 | //IScriptHost root = host.GetRoot(); | ||
57 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); | 56 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); |
58 | 57 | ||
58 | // First time start? Lets fire up our compiler... | ||
59 | if (LSLCompiler == null) | ||
60 | LSLCompiler = new Compiler.LSL.Compiler(m_scriptEngine); | ||
61 | |||
62 | //IScriptHost root = host.GetRoot(); | ||
63 | |||
59 | // We will initialize and start the script. | 64 | // We will initialize and start the script. |
60 | // It will be up to the script itself to hook up the correct events. | 65 | // It will be up to the script itself to hook up the correct events. |
61 | string ScriptSource = String.Empty; | 66 | string ScriptSource = String.Empty; |
@@ -65,7 +70,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
65 | try | 70 | try |
66 | { | 71 | { |
67 | // Compile (We assume LSL) | 72 | // Compile (We assume LSL) |
68 | ScriptSource = LSLCompiler.CompileFromLSLText(Script); | 73 | ScriptSource = LSLCompiler.PerformScriptCompile(Script); |
69 | 74 | ||
70 | #if DEBUG | 75 | #if DEBUG |
71 | long before; | 76 | long before; |