diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index b16ca53..4d8fb90 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
45 | private const int DEBUG_CHANNEL = 2147483647; | 45 | private const int DEBUG_CHANNEL = 2147483647; |
46 | 46 | ||
47 | private bool m_enabled = true; | 47 | private bool m_enabled = true; |
48 | private int m_saydistance = 30; | 48 | private int m_saydistance = 20; |
49 | private int m_shoutdistance = 100; | 49 | private int m_shoutdistance = 100; |
50 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
51 | private List<Scene> m_scenes = new List<Scene>(); | 51 | private List<Scene> m_scenes = new List<Scene>(); |
@@ -242,7 +242,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
242 | 242 | ||
243 | foreach (Scene s in m_scenes) | 243 | foreach (Scene s in m_scenes) |
244 | { | 244 | { |
245 | s.ForEachScenePresence( | 245 | // This should use ForEachClient, but clients don't have a position. |
246 | // If camera is moved into client, then camera position can be used | ||
247 | s.ForEachRootScenePresence( | ||
246 | delegate(ScenePresence presence) | 248 | delegate(ScenePresence presence) |
247 | { | 249 | { |
248 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); | 250 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); |
@@ -306,12 +308,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
306 | 308 | ||
307 | if (c.Scene != null) | 309 | if (c.Scene != null) |
308 | { | 310 | { |
309 | ((Scene)c.Scene).ForEachRootScenePresence | 311 | ((Scene)c.Scene).ForEachRootClient |
310 | ( | 312 | ( |
311 | delegate(ScenePresence presence) | 313 | delegate(IClientAPI client) |
312 | { | 314 | { |
313 | IClientAPI client = presence.ControllingClient; | ||
314 | |||
315 | // don't forward SayOwner chat from objects to | 315 | // don't forward SayOwner chat from objects to |
316 | // non-owner agents | 316 | // non-owner agents |
317 | if ((c.Type == ChatTypeEnum.Owner) && | 317 | if ((c.Type == ChatTypeEnum.Owner) && |
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
321 | 321 | ||
322 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, | 322 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, |
323 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | 323 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); |
324 | receiverIDs.Add(presence.UUID); | 324 | receiverIDs.Add(client.AgentId); |
325 | } | 325 | } |
326 | ); | 326 | ); |
327 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( | 327 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( |