From 59232a6ea8739f4a83c21771e550893e75672b50 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Nov 2011 20:05:31 +0000 Subject: Change default say distance to 20m from 30m, the same as on the big grid. This is to improve the migration of scripts that expect a 20m say distance. If you want to keep a 30m say distance then please set this as the say_distance parameter in the [Chat] section of OpenSim.ini. --- OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Chat') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 2cd71c4..f5cc4c3 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 private const int DEBUG_CHANNEL = 2147483647; private bool m_enabled = true; - private int m_saydistance = 30; + private int m_saydistance = 20; private int m_shoutdistance = 100; private int m_whisperdistance = 10; private List m_scenes = new List(); -- cgit v1.1 From 94dc7d07ebc22ce0e0d9b77e91538ddc90799bee Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 3 Nov 2011 17:06:08 -0700 Subject: Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls to the 3 iteration functions so more of them are using the correct iteration for the action they are performing. The 3 iterators that seem to fit all actions within OpenSim at this time are: ForEachAvatar: Perform an action on all avatars (root presences) ForEachClient: Perform an action on all clients (root or child clients) ForEachRootClient: Perform an action on all clients that have an avatar There are still a dozen places or so calling the old ForEachScenePresence that will take a little more refactoring to eliminate. --- OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Chat') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index f5cc4c3..783a03b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -228,7 +228,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat foreach (Scene s in m_scenes) { - s.ForEachScenePresence( + // This should use ForEachClient, but clients don't have a position. + // If camera is moved into client, then camera position can be used + s.ForEachAvatar( delegate(ScenePresence presence) { if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType)) @@ -279,11 +281,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat HashSet receiverIDs = new HashSet(); - ((Scene)c.Scene).ForEachRootScenePresence( - delegate(ScenePresence presence) + ((Scene)c.Scene).ForEachRootClient( + delegate(IClientAPI client) { - IClientAPI client = presence.ControllingClient; - // don't forward SayOwner chat from objects to // non-owner agents if ((c.Type == ChatTypeEnum.Owner) && @@ -292,8 +292,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat return; client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, - (byte)sourceType, (byte)ChatAudibleLevel.Fully); - receiverIDs.Add(presence.UUID); + (byte)sourceType, (byte)ChatAudibleLevel.Fully); + receiverIDs.Add(client.AgentId); }); (c.Scene as Scene).EventManager.TriggerOnChatToClients( -- cgit v1.1 From b8d50b10fbb03ed8c8a9aac94564c354559c3bb0 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 3 Nov 2011 17:53:51 -0700 Subject: Rename ForEachAvatar back to ForEachScenePresence. The other changes from previous commit which sort out which iterator is used are left intact. A discussion is needed as to what constitutes an avatar vs a ScenePresence. --- OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Chat') diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 783a03b..10b4c37 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs @@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat { // This should use ForEachClient, but clients don't have a position. // If camera is moved into client, then camera position can be used - s.ForEachAvatar( + s.ForEachRootScenePresence( delegate(ScenePresence presence) { if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType)) -- cgit v1.1