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.

afrisby
Tedd Hansen 2007-09-13 14:15:02 +00:00
parent 888133e987
commit 0709d96716
1 changed files with 9 additions and 2 deletions

View File

@ -37,7 +37,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
/// <returns>Filename to .dll assembly</returns>
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));
}
}
/// <summary>
/// Compile CS script to .Net assembly (.dll)