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.
parent
888133e987
commit
0709d96716
|
@ -36,9 +36,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||||
/// <param name="Script">LSL script</param>
|
/// <param name="Script">LSL script</param>
|
||||||
/// <returns>Filename to .dll assembly</returns>
|
/// <returns>Filename to .dll assembly</returns>
|
||||||
public string CompileFromLSLText(string Script)
|
public string CompileFromLSLText(string Script)
|
||||||
|
{
|
||||||
|
if (Script.Substring(0, 4).ToLower() == "//c#")
|
||||||
|
{
|
||||||
|
return LSL_Converter.Convert(Script);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return CompileFromCSText(LSL_Converter.Convert(Script));
|
return CompileFromCSText(LSL_Converter.Convert(Script));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compile CS script to .Net assembly (.dll)
|
/// Compile CS script to .Net assembly (.dll)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue