From b8e8a33d60b98894671a34a19e8d982463fa4785 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 29 Nov 2008 13:49:20 +0000 Subject: Mantis #2584 Applying a patch from Diva. This patch introduces significant improvements in teleporting. Thank you, Diva. --- .../Scenes/Hypergrid/HGSceneCommunicationService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs') diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index 9dd2426..5d34773 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -149,6 +149,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid if (destRegionUp) { + // Fixing a bug where teleporting while sitting results in the avatar ending up removed from // both regions if (avatar.ParentID != (uint)0) @@ -169,6 +170,17 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid agent.child = false; m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agent); + if (eq != null) + { + OSD Item = EventQueueHelper.EnableSimulator(realHandle, reg.ExternalEndPoint); + eq.Enqueue(Item, avatar.UUID); + } + else + { + avatar.ControllingClient.InformClientOfNeighbour(realHandle, reg.ExternalEndPoint); + // TODO: make Event Queue disablable! + } + m_commsProvider.InterRegion.ExpectAvatarCrossing(reg.RegionHandle, avatar.ControllingClient.AgentId, position, false); Thread.Sleep(2000); @@ -223,6 +235,12 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid { //SendCloseChildAgentConnections(avatar.UUID, avatar.GetKnownRegionList()); SendCloseChildAgentConnections(avatar.UUID, childRegions); + if (eq != null) + { + OSD Item = EventQueueHelper.DisableSimulator(m_regionInfo.RegionHandle); + eq.Enqueue(Item, avatar.UUID); + } + Thread.Sleep(2000); CloseConnection(avatar.UUID); } // if (teleport success) // seems to be always success here -- cgit v1.1