diff options
author | Dr Scofield | 2008-10-21 08:51:27 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-21 08:51:27 +0000 |
commit | fd108872d85d22b006184b105212572b669fbc6c (patch) | |
tree | 81f57f49702211f3cabaa67f18ba15798b6e03cd /OpenSim/Region/Environment/Modules/Scripting | |
parent | More work in vertex normals and texture UVs. Syncing code with pyov. (diff) | |
download | opensim-SC_OLD-fd108872d85d22b006184b105212572b669fbc6c.zip opensim-SC_OLD-fd108872d85d22b006184b105212572b669fbc6c.tar.gz opensim-SC_OLD-fd108872d85d22b006184b105212572b669fbc6c.tar.bz2 opensim-SC_OLD-fd108872d85d22b006184b105212572b669fbc6c.tar.xz |
fixes #2445 & #2449. interim fix that will make listeners work
again. need to investigate why chat position is catastrophically off.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs index 36add06..b7d9321 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -34,8 +34,8 @@ using OpenSim.Framework; | |||
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
35 | using OpenSim.Region.Environment.Scenes; | 35 | using OpenSim.Region.Environment.Scenes; |
36 | 36 | ||
37 | // using log4net; | 37 | using log4net; |
38 | // using System.Reflection; | 38 | using System.Reflection; |
39 | 39 | ||
40 | 40 | ||
41 | /***************************************************** | 41 | /***************************************************** |
@@ -205,6 +205,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
205 | m_listenerManager.DeleteListener(itemID); | 205 | m_listenerManager.DeleteListener(itemID); |
206 | } | 206 | } |
207 | 207 | ||
208 | |||
209 | protected static Vector3 CenterOfRegion = new Vector3(128, 128, 20); | ||
210 | |||
208 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg) | 211 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg) |
209 | { | 212 | { |
210 | Vector3 position; | 213 | Vector3 position; |
@@ -215,6 +218,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
215 | position = source.AbsolutePosition; | 218 | position = source.AbsolutePosition; |
216 | else if ((avatar = m_scene.GetScenePresence(id)) != null) | 219 | else if ((avatar = m_scene.GetScenePresence(id)) != null) |
217 | position = avatar.AbsolutePosition; | 220 | position = avatar.AbsolutePosition; |
221 | else if (ChatTypeEnum.Region == type) | ||
222 | position = CenterOfRegion; | ||
218 | else | 223 | else |
219 | return; | 224 | return; |
220 | 225 | ||
@@ -236,6 +241,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
236 | /// <param name="msg">msg to sent</param> | 241 | /// <param name="msg">msg to sent</param> |
237 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg, Vector3 position) | 242 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg, Vector3 position) |
238 | { | 243 | { |
244 | // m_log.DebugFormat("[WorldComm] got[2] type {0}, channel {1}, name {2}, id {3}, msg {4}", | ||
245 | // type, channel, name, id, msg); | ||
246 | |||
239 | // Determine which listen event filters match the given set of arguments, this results | 247 | // Determine which listen event filters match the given set of arguments, this results |
240 | // in a limited set of listeners, each belonging a host. If the host is in range, add them | 248 | // in a limited set of listeners, each belonging a host. If the host is in range, add them |
241 | // to the pending queue. | 249 | // to the pending queue. |
@@ -328,9 +336,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
328 | private void DeliverClientMessage(Object sender, OSChatMessage e) | 336 | private void DeliverClientMessage(Object sender, OSChatMessage e) |
329 | { | 337 | { |
330 | if (null != e.Sender) | 338 | if (null != e.Sender) |
331 | DeliverMessage(e.Type, e.Channel, e.Sender.Name, e.Sender.AgentId, e.Message, e.Position); | 339 | DeliverMessage(e.Type, e.Channel, e.Sender.Name, e.Sender.AgentId, e.Message); // , e.Position); |
332 | else | 340 | else |
333 | DeliverMessage(e.Type, e.Channel, e.From, UUID.Zero, e.Message, e.Position); | 341 | DeliverMessage(e.Type, e.Channel, e.From, UUID.Zero, e.Message); // , e.Position); |
334 | } | 342 | } |
335 | 343 | ||
336 | public Object[] GetSerializationData(UUID itemID) | 344 | public Object[] GetSerializationData(UUID itemID) |