Allows to use the new script engine feature. Begin your script with

//XEngine: or //DotNetEnine: , optionally followed by a language
like //XEngine:lsl, and it will be run on the chosen engine.
0.6.0-stable
Melanie Thielker 2008-09-21 22:16:17 +00:00
parent 94aaf67dfa
commit 1602ba6175
2 changed files with 18 additions and 0 deletions

View File

@ -194,6 +194,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine)
{
if (script.Length > 15)
{
if (script.Substring(0, 15) == "//DotNetEngine:")
{
script = "//" + script.Substring(15);
engine = "DotNetEngine";
}
}
if (engine != "DotNetEngine")
return;

View File

@ -341,6 +341,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine)
{
if (script.Length > 10)
{
if (script.Substring(0, 10) == "//XEngine:")
{
script = "//" + script.Substring(10);
engine = "XEngine";
}
}
if (engine != "XEngine")
return;