diff options
author | Tedd Hansen | 2007-09-13 14:15:02 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-09-13 14:15:02 +0000 |
commit | 0709d967169b94f9b308a719dd66ed79d0bc9c27 (patch) | |
tree | a103a6754ff2ca766f98a2a4c388dcda7eb84caa | |
parent | add some locks around DataSet manipulation to ensure we are doing this (diff) | |
download | opensim-SC_OLD-0709d967169b94f9b308a719dd66ed79d0bc9c27.zip opensim-SC_OLD-0709d967169b94f9b308a719dd66ed79d0bc9c27.tar.gz opensim-SC_OLD-0709d967169b94f9b308a719dd66ed79d0bc9c27.tar.bz2 opensim-SC_OLD-0709d967169b94f9b308a719dd66ed79d0bc9c27.tar.xz |
If first 4 characters in script is "//C#" script will be treated as pure C# instead of LSL/C# hybrid. This means no preprocessing before compile.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index b63a6ce..bbfd097 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -36,8 +36,15 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
36 | /// <param name="Script">LSL script</param> | 36 | /// <param name="Script">LSL script</param> |
37 | /// <returns>Filename to .dll assembly</returns> | 37 | /// <returns>Filename to .dll assembly</returns> |
38 | public string CompileFromLSLText(string Script) | 38 | public string CompileFromLSLText(string Script) |
39 | { | 39 | { |
40 | return CompileFromCSText(LSL_Converter.Convert(Script)); | 40 | if (Script.Substring(0, 4).ToLower() == "//c#") |
41 | { | ||
42 | return LSL_Converter.Convert(Script); | ||
43 | } | ||
44 | else | ||
45 | { | ||
46 | return CompileFromCSText(LSL_Converter.Convert(Script)); | ||
47 | } | ||
41 | } | 48 | } |
42 | /// <summary> | 49 | /// <summary> |
43 | /// Compile CS script to .Net assembly (.dll) | 50 | /// Compile CS script to .Net assembly (.dll) |