From 2f70baee528ae94a3456c09ebdb60e9a24d7f7d0 Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Sat, 28 Jun 2008 16:18:47 +0000
Subject: Mantis#1623. Thank you, Melanie for a patch that: Fully defines the
equality operators on the lsl types and plubs in the script engine side of
the work begun in 0001616 (aly, this one's for you)
---
.../Common/ScriptEngineBase/ScriptManager.cs | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs')
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index eed0b86..75ab2aa 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -72,6 +72,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public LLUUID itemID;
public string script;
public LUType Action;
+ public int startParam;
+ public bool postOnRez;
}
private enum LUType
@@ -223,7 +225,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
else if (item.Action == LUType.Load)
{
- _StartScript(item.localID, item.itemID, item.script);
+ _StartScript(item.localID, item.itemID, item.script, item.startParam, item.postOnRez);
}
}
}
@@ -252,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
///
///
///
- public void StartScript(uint localID, LLUUID itemID, string Script)
+ public void StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez)
{
lock (LUQueue)
{
@@ -267,6 +269,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
ls.itemID = itemID;
ls.script = Script;
ls.Action = LUType.Load;
+ ls.startParam = startParam;
+ ls.postOnRez = postOnRez;
LUQueue.Enqueue(ls);
}
}
@@ -282,6 +286,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
ls.localID = localID;
ls.itemID = itemID;
ls.Action = LUType.Unload;
+ ls.startParam = 0;
+ ls.postOnRez = false;
lock (LUQueue)
{
LUQueue.Enqueue(ls);
@@ -291,7 +297,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// Create a new instance of the compiler (reuse)
//private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
- public abstract void _StartScript(uint localID, LLUUID itemID, string Script);
+ public abstract void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez);
public abstract void _StopScript(uint localID, LLUUID itemID);
@@ -423,9 +429,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void ResetScript(uint localID, LLUUID itemID)
{
- string script = GetScript(localID, itemID).Source;
+ IScript s = GetScript(localID, itemID);
+ string script = s.Source;
StopScript(localID, itemID);
- StartScript(localID, itemID, script);
+ StartScript(localID, itemID, script, s.StartParam, false);
}
--
cgit v1.1