diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 464d922..91d40ab 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -468,26 +468,20 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
468 | 468 | ||
469 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) | 469 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) |
470 | { | 470 | { |
471 | // Get a fresh list that will not change as people get teleported away | 471 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) |
472 | List<ScenePresence> presences = m_scene.GetScenePresences(); | ||
473 | |||
474 | foreach(ScenePresence p in presences) | ||
475 | { | 472 | { |
476 | if (p.UUID != senderID) | 473 | if (sp.UUID != senderID) |
477 | { | 474 | { |
475 | ScenePresence p = m_scene.GetScenePresence(sp.UUID); | ||
478 | // make sure they are still there, we could be working down a long list | 476 | // make sure they are still there, we could be working down a long list |
479 | ScenePresence s = m_scene.GetScenePresence(p.UUID); | 477 | // Also make sure they are actually in the region |
480 | if (s != null) | 478 | if (p != null && !p.IsChildAgent) |
481 | { | 479 | { |
482 | // Also make sure they are actually in the region | 480 | p.ControllingClient.SendTeleportLocationStart(); |
483 | if (!s.IsChildAgent) | 481 | m_scene.TeleportClientHome(p.UUID, p.ControllingClient); |
484 | { | ||
485 | s.ControllingClient.SendTeleportLocationStart(); | ||
486 | m_scene.TeleportClientHome(s.UUID, s.ControllingClient); | ||
487 | } | ||
488 | } | 482 | } |
489 | } | 483 | } |
490 | } | 484 | }); |
491 | } | 485 | } |
492 | private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) | 486 | private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) |
493 | { | 487 | { |
@@ -765,12 +759,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
765 | 759 | ||
766 | public void sendRegionInfoPacketToAll() | 760 | public void sendRegionInfoPacketToAll() |
767 | { | 761 | { |
768 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 762 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) |
769 | |||
770 | for (int i = 0; i < avatars.Count; i++) | ||
771 | { | 763 | { |
772 | HandleRegionInfoRequest(avatars[i].ControllingClient); | 764 | if (!sp.IsChildAgent) |
773 | } | 765 | HandleRegionInfoRequest(sp.ControllingClient); |
766 | }); | ||
774 | } | 767 | } |
775 | 768 | ||
776 | public void sendRegionHandshake(IClientAPI remoteClient) | 769 | public void sendRegionHandshake(IClientAPI remoteClient) |