From 0709d967169b94f9b308a719dd66ed79d0bc9c27 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Thu, 13 Sep 2007 14:15:02 +0000 Subject: 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. --- .../Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') 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 /// LSL script /// Filename to .dll assembly public string CompileFromLSLText(string Script) - { - return CompileFromCSText(LSL_Converter.Convert(Script)); + { + if (Script.Substring(0, 4).ToLower() == "//c#") + { + return LSL_Converter.Convert(Script); + } + else + { + return CompileFromCSText(LSL_Converter.Convert(Script)); + } } /// /// Compile CS script to .Net assembly (.dll) -- cgit v1.1