diff options
author | Dan Lake | 2011-10-27 00:42:21 -0700 |
---|---|---|
committer | Dan Lake | 2011-10-27 00:42:21 -0700 |
commit | b98613091cd6dc2f914fb5ab38ca33cdff21fc24 (patch) | |
tree | 42be01a68146870ddcd64e842a13f2fbb46b4738 /OpenSim/Region/CoreModules/Avatar | |
parent | For now, comment out error message on new script engine console commands. (diff) | |
download | opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.zip opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.gz opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.bz2 opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.xz |
Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 4359c01..2cd71c4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -279,12 +279,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
279 | 279 | ||
280 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); | 280 | HashSet<UUID> receiverIDs = new HashSet<UUID>(); |
281 | 281 | ||
282 | ((Scene)c.Scene).ForEachScenePresence( | 282 | ((Scene)c.Scene).ForEachRootScenePresence( |
283 | delegate(ScenePresence presence) | 283 | delegate(ScenePresence presence) |
284 | { | 284 | { |
285 | // ignore chat from child agents | ||
286 | if (presence.IsChildAgent) return; | ||
287 | |||
288 | IClientAPI client = presence.ControllingClient; | 285 | IClientAPI client = presence.ControllingClient; |
289 | 286 | ||
290 | // don't forward SayOwner chat from objects to | 287 | // don't forward SayOwner chat from objects to |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 5ec64d5..562c3b1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -140,10 +140,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
140 | // This is a bit crude. It seems the client will be null before it actually stops the thread | 140 | // This is a bit crude. It seems the client will be null before it actually stops the thread |
141 | // The thread will kill itself eventually :/ | 141 | // The thread will kill itself eventually :/ |
142 | // Is there another way to make sure *all* clients get this 'inter region' message? | 142 | // Is there another way to make sure *all* clients get this 'inter region' message? |
143 | m_scene.ForEachScenePresence( | 143 | m_scene.ForEachRootScenePresence( |
144 | delegate(ScenePresence p) | 144 | delegate(ScenePresence p) |
145 | { | 145 | { |
146 | if (p.UUID != godID && !p.IsChildAgent) | 146 | if (p.UUID != godID) |
147 | { | 147 | { |
148 | // Possibly this should really be p.Close() though that method doesn't send a close | 148 | // Possibly this should really be p.Close() though that method doesn't send a close |
149 | // to the client | 149 | // to the client |