From 06f74e4295061f789c084dca95209fc84dfd8cb4 Mon Sep 17 00:00:00 2001 From: diva Date: Mon, 22 Dec 2008 17:43:51 +0000 Subject: Fix for attachment crossing on TPs. Now that we're letting the viewer have control over MakeRoot at the destination, we need to pass the attachments after that. Attachment crossing requires a root agent at the destination. --- .../Scenes/Hypergrid/HGSceneCommunicationService.cs | 17 ++++++++++------- .../Environment/Scenes/SceneCommunicationService.cs | 14 ++++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index 78d5725..f01b2863 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -257,8 +257,6 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid //} avatar.MakeChildAgent(); - // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it - avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true); m_log.DebugFormat( "[CAPS]: Sending new CAPS seed url {0} to client {1}", agent.CapsPath, avatar.UUID); @@ -288,8 +286,16 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid KiPrimitive(avatar.LocalId); } + // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which + // trigers a whole shebang of things there, including MakeRoot. So let's wait plenty before + // we send the attachments and close things here. + // It would be nice if the client would tell us when that whole thing is done, so we wouldn't have + // to use this Thread.Sleep voodoo + Thread.Sleep(3000); + + // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it + avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true); - //avatar.Close(); // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone /// @@ -297,10 +303,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid /// if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY) || isHyperLink) { - // FinishTeleport makes the client send CompleteMovementIntoRegion (at the destination), which - // trigers a whole shebang of things there. So let's wait plenty before we disconnect. - // The user is already there anyway. - Thread.Sleep(8000); + Thread.Sleep(5000); avatar.Close(); CloseConnection(avatar.UUID); } diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 98ea879..3a16b91 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -853,8 +853,6 @@ namespace OpenSim.Region.Environment.Scenes //} avatar.MakeChildAgent(); - // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it - avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true); m_log.DebugFormat( "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); @@ -877,15 +875,19 @@ namespace OpenSim.Region.Environment.Scenes KiPrimitive(avatar.LocalId); } + // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which + // trigers a whole shebang of things there, including MakeRoot. So let's wait plenty before + // we send the attachments and close things here. + Thread.Sleep(3000); + + // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it + avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true); // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) { - // FinishTeleport makes the client send CompleteMovementIntoRegion (at the destination), which - // trigers a whole shebang of things there. So let's wait plenty before we disconnect. - // The user is already there anyway. - Thread.Sleep(8000); + Thread.Sleep(5000); avatar.Close(); CloseConnection(avatar.UUID); } -- cgit v1.1