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/World/Estate | |
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 'OpenSim/Region/CoreModules/World/Estate')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index c199a77..5427b68 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -658,17 +658,15 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
658 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) | 658 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) |
659 | return; | 659 | return; |
660 | 660 | ||
661 | Scene.ForEachScenePresence(delegate(ScenePresence sp) | 661 | Scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
662 | { | 662 | { |
663 | if (sp.UUID != senderID) | 663 | if (sp.UUID != senderID) |
664 | { | 664 | { |
665 | ScenePresence p = Scene.GetScenePresence(sp.UUID); | ||
666 | // make sure they are still there, we could be working down a long list | 665 | // make sure they are still there, we could be working down a long list |
667 | // Also make sure they are actually in the region | 666 | // Also make sure they are actually in the region |
668 | if (p != null && !p.IsChildAgent) | 667 | ScenePresence p; |
669 | { | 668 | if(Scene.TryGetScenePresence(sp.UUID, out p)) |
670 | Scene.TeleportClientHome(p.UUID, p.ControllingClient); | 669 | Scene.TeleportClientHome(p.UUID, p.ControllingClient); |
671 | } | ||
672 | } | 670 | } |
673 | }); | 671 | }); |
674 | } | 672 | } |
@@ -929,10 +927,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
929 | 927 | ||
930 | public void sendRegionInfoPacketToAll() | 928 | public void sendRegionInfoPacketToAll() |
931 | { | 929 | { |
932 | Scene.ForEachScenePresence(delegate(ScenePresence sp) | 930 | Scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
933 | { | 931 | { |
934 | if (!sp.IsChildAgent) | 932 | HandleRegionInfoRequest(sp.ControllingClient); |
935 | HandleRegionInfoRequest(sp.ControllingClient); | ||
936 | }); | 933 | }); |
937 | } | 934 | } |
938 | 935 | ||