diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 7f452e0..c81e6bd 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -39,6 +39,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
39 | private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); | 39 | private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); |
40 | private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); | 40 | private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); |
41 | private static UInt64 scriptCompileCounter = 0; | 41 | private static UInt64 scriptCompileCounter = 0; |
42 | private static int instanceID = new Random().Next(0, int.MaxValue); // Implemented due to peer preassure --- will cause garbage in ScriptEngines folder ;) | ||
42 | //private ICodeCompiler icc = codeProvider.CreateCompiler(); | 43 | //private ICodeCompiler icc = codeProvider.CreateCompiler(); |
43 | public string CompileFromFile(string LSOFileName) | 44 | public string CompileFromFile(string LSOFileName) |
44 | { | 45 | { |
@@ -82,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
82 | { | 83 | { |
83 | // Output assembly name | 84 | // Output assembly name |
84 | scriptCompileCounter++; | 85 | scriptCompileCounter++; |
85 | string OutFile = Path.Combine("ScriptEngines", "Script_" + scriptCompileCounter + ".dll"); | 86 | string OutFile = Path.Combine("ScriptEngines", "DotNetScript_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); |
86 | try | 87 | try |
87 | { | 88 | { |
88 | File.Delete(OutFile); | 89 | File.Delete(OutFile); |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 0c28617..bbd6839 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
53 | 53 | ||
54 | public string Convert(string Script) | 54 | public string Convert(string Script) |
55 | { | 55 | { |
56 | quotes.Clear(); | ||
56 | string Return = ""; | 57 | string Return = ""; |
57 | Script = " \r\n" + Script; | 58 | Script = " \r\n" + Script; |
58 | 59 | ||
@@ -310,6 +311,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
310 | Return += Script; | 311 | Return += Script; |
311 | Return += "} }\r\n"; | 312 | Return += "} }\r\n"; |
312 | 313 | ||
314 | |||
315 | quotes.Clear(); | ||
316 | |||
313 | return Return; | 317 | return Return; |
314 | } | 318 | } |
315 | } | 319 | } |