diff options
author | Adam Frisby | 2008-05-08 13:41:10 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-08 13:41:10 +0000 |
commit | dc21e8d5e2c830311271ac5cafb0d166a571a74e (patch) | |
tree | 15ada49d200622454d785ccdf56012188e462cc3 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase | |
parent | * Commit from Jed Zhu (DeepThink) - Initial implementation of mesh collision... (diff) | |
download | opensim-SC-dc21e8d5e2c830311271ac5cafb0d166a571a74e.zip opensim-SC-dc21e8d5e2c830311271ac5cafb0d166a571a74e.tar.gz opensim-SC-dc21e8d5e2c830311271ac5cafb0d166a571a74e.tar.bz2 opensim-SC-dc21e8d5e2c830311271ac5cafb0d166a571a74e.tar.xz |
* Applying patch #1121 - Fixes for llListen() (Thanks Middlelink!)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs index 55dbabf..6a1235b 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs | |||
@@ -32,6 +32,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
32 | { | 32 | { |
33 | public class Listener | 33 | public class Listener |
34 | { | 34 | { |
35 | // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
36 | |||
35 | public AsyncCommandManager m_CmdManager; | 37 | public AsyncCommandManager m_CmdManager; |
36 | 38 | ||
37 | public Listener(AsyncCommandManager CmdManager) | 39 | public Listener(AsyncCommandManager CmdManager) |
@@ -49,22 +51,23 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
49 | { | 51 | { |
50 | while (comms.HasMessages()) | 52 | while (comms.HasMessages()) |
51 | { | 53 | { |
54 | ListenerInfo lInfo = comms.GetNextMessage(); | ||
52 | if (m_CmdManager.m_ScriptEngine.m_ScriptManager.GetScript( | 55 | if (m_CmdManager.m_ScriptEngine.m_ScriptManager.GetScript( |
53 | comms.PeekNextMessageLocalID(), comms.PeekNextMessageItemID()) != null) | 56 | lInfo.GetLocalID(), lInfo.GetItemID()) != null) |
54 | { | 57 | { |
55 | ListenerInfo lInfo = comms.GetNextMessage(); | ||
56 | |||
57 | //Deliver data to prim's listen handler | 58 | //Deliver data to prim's listen handler |
58 | object[] resobj = new object[] | 59 | object[] resobj = new object[] |
59 | { | 60 | { |
60 | //lInfo.GetChannel(), lInfo.GetName(), lInfo.GetID().ToString(), lInfo.GetMessage() | 61 | //lInfo.GetChannel(), lInfo.GetName(), lInfo.GetID().ToString(), lInfo.GetMessage() |
61 | new LSL_Types.LSLInteger(lInfo.GetChannel()), new LSL_Types.LSLString(lInfo.GetName()), new LSL_Types.LSLString(lInfo.GetSourceItemID().ToString()), new LSL_Types.LSLString(lInfo.GetMessage()) | 62 | new LSL_Types.LSLInteger(lInfo.GetChannel()), new LSL_Types.LSLString(lInfo.GetName()), new LSL_Types.LSLString(lInfo.GetID().ToString()), new LSL_Types.LSLString(lInfo.GetMessage()) |
62 | }; | 63 | }; |
63 | 64 | ||
64 | m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( | 65 | m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( |
65 | lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj | 66 | lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj |
66 | ); | 67 | ); |
67 | } | 68 | } |
69 | // else | ||
70 | // m_log.Info("[ScriptEngineBase.AsyncCommandPlugins: received a listen event for a (no longer) existing script ("+lInfo.GetLocalID().AsString()+")"); | ||
68 | } | 71 | } |
69 | } | 72 | } |
70 | } | 73 | } |