diff options
author | Charles Krinke | 2007-12-12 22:07:40 +0000 |
---|---|---|
committer | Charles Krinke | 2007-12-12 22:07:40 +0000 |
commit | a0a189aed297109777584644f1b642fa21efc306 (patch) | |
tree | e3e4bf1b6854548a0d73a9e47ba7dfd7c09adb6a /OpenSim | |
parent | remove another partial class, and map another class back to a real file (diff) | |
download | opensim-SC_OLD-a0a189aed297109777584644f1b642fa21efc306.zip opensim-SC_OLD-a0a189aed297109777584644f1b642fa21efc306.tar.gz opensim-SC_OLD-a0a189aed297109777584644f1b642fa21efc306.tar.bz2 opensim-SC_OLD-a0a189aed297109777584644f1b642fa21efc306.tar.xz |
Thanks to Alondria for:
llResetScript() is now functional. With this patch, Kan-script 0000003 should run.
Noted the llListen(0,"","","") errored due to "" != UUID - patched to set to
NULL_KEY which then works to listen to everything.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 31 |
2 files changed, 21 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 0e905be..94479a0 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -292,6 +292,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
292 | 292 | ||
293 | public int llListen(int channelID, string name, string ID, string msg) | 293 | public int llListen(int channelID, string name, string ID, string msg) |
294 | { | 294 | { |
295 | if (ID == "") | ||
296 | { | ||
297 | ID = LLUUID.Zero.ToString(); | ||
298 | } | ||
295 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 299 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
296 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, ID, msg); | 300 | return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, ID, msg); |
297 | } | 301 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 0d49174..6b83dff 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -127,18 +127,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
127 | { | 127 | { |
128 | if (loadQueue.Count == 0 && unloadQueue.Count == 0) | 128 | if (loadQueue.Count == 0 && unloadQueue.Count == 0) |
129 | Thread.Sleep(scriptLoadUnloadThread_IdleSleepms); | 129 | Thread.Sleep(scriptLoadUnloadThread_IdleSleepms); |
130 | |||
131 | if (loadQueue.Count > 0) | ||
132 | { | ||
133 | LoadStruct item = loadQueue.Dequeue(); | ||
134 | _StartScript(item.localID, item.itemID, item.script); | ||
135 | } | ||
136 | |||
137 | if (unloadQueue.Count > 0) | 130 | if (unloadQueue.Count > 0) |
138 | { | 131 | { |
139 | UnloadStruct item = unloadQueue.Dequeue(); | 132 | UnloadStruct item = unloadQueue.Dequeue(); |
140 | _StopScript(item.localID, item.itemID); | 133 | _StopScript(item.localID, item.itemID); |
141 | } | 134 | } |
135 | if (loadQueue.Count > 0) | ||
136 | { | ||
137 | LoadStruct item = loadQueue.Dequeue(); | ||
138 | _StartScript(item.localID, item.itemID, item.script); | ||
139 | } | ||
142 | } | 140 | } |
143 | } | 141 | } |
144 | catch (ThreadAbortException tae) | 142 | catch (ThreadAbortException tae) |
@@ -279,13 +277,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
279 | 277 | ||
280 | try | 278 | try |
281 | { | 279 | { |
282 | 280 | if (!Script.EndsWith("dll")) | |
283 | // Compile (We assume LSL) | 281 | { |
284 | ScriptSource = LSLCompiler.CompileFromLSLText(Script); | 282 | // Compile (We assume LSL) |
285 | //Console.WriteLine("Compilation of " + FileName + " done"); | 283 | ScriptSource = LSLCompiler.CompileFromLSLText(Script); |
286 | // * Insert yield into code | 284 | //Console.WriteLine("Compilation of " + FileName + " done"); |
287 | ScriptSource = ProcessYield(ScriptSource); | 285 | // * Insert yield into code |
288 | 286 | ScriptSource = ProcessYield(ScriptSource); | |
287 | } | ||
288 | else | ||
289 | { | ||
290 | ScriptSource = Script; | ||
291 | } | ||
289 | 292 | ||
290 | #if DEBUG | 293 | #if DEBUG |
291 | long before; | 294 | long before; |