From 2eda6a12962e0af23e060d4338e32896ddedf366 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 28 Mar 2008 12:47:03 +0000 Subject: From: Michael Osias This patch implements llMessageLinked. I had to make a change to llGetLinkNumber to return m_host.LinkNum + 1 for link sets of more than 1 prim, or 0 for a single object, since according to: http://rpgstats.com/wiki/index.php?title=LlMessageLinked linksets with 2 or more prims start the link numbering at 1, but a single prims link number is 0. --- .../Region/Environment/Modules/WorldCommModule.cs | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/WorldCommModule.cs') diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index e1d2fbc..79e475c 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs @@ -75,6 +75,7 @@ namespace OpenSim.Region.Environment.Modules private ListenerManager m_listenerManager; private Queue m_pendingQ; private Queue m_pending; + public WorldCommModule() { } @@ -112,6 +113,11 @@ namespace OpenSim.Region.Environment.Modules client.OnChatFromViewer += DeliverClientMessage; } + /******************************************************************** + * + * Listener Stuff + * + * *****************************************************************/ private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) { DeliverMessage(e.Sender.AgentId.ToString(), @@ -179,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules m_scene.Entities.TryGetValue(li.GetHostID(), out sPart); - if(sPart != null) + if (sPart != null) { // Dont process if this message is from itself! if (li.GetHostID().ToString().Equals(sourceItemID) || @@ -291,7 +297,7 @@ namespace OpenSim.Region.Environment.Modules lock (m_pending.SyncRoot) { - li = (ListenerInfo) m_pending.Dequeue(); + li = (ListenerInfo)m_pending.Dequeue(); } return li; @@ -306,12 +312,13 @@ namespace OpenSim.Region.Environment.Modules { return ((ListenerInfo)m_pending.Peek()).GetItemID(); } - } - // hostID: the ID of the ScenePart - // itemID: the ID of the script host engine - // localID: local ID of host engine + /********************************************************** + * + * Even more listener stuff + * + * ********************************************************/ public class ListenerManager { //private Dictionary m_listeners; @@ -434,9 +441,9 @@ namespace OpenSim.Region.Environment.Modules { ListenerInfo li = (ListenerInfo)en.Value; - if (li.GetHostID().Equals(listenerKey)) + if (li.IsActive()) { - if (li.IsActive()) + if (li.GetHostID().Equals(listenerKey)) { if (channel == li.GetChannel()) { @@ -575,4 +582,5 @@ namespace OpenSim.Region.Environment.Modules return m_id; } } + } -- cgit v1.1