From 902e8019de4c61379e3dc51f506bd4a1af0a9df3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 20 Nov 2016 05:06:50 +0000 Subject: [PATCH] HG add a small delay before start sending region data --- .../Region/Framework/Scenes/ScenePresence.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2cfdd946f9..7efd9200ed 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2071,14 +2071,13 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat("[CompleteMovement]: Missing COF for {0} is {1}", client.AgentId, COF); } - if(!gotCrossUpdate) - RotateToLookAt(look); // Tell the client that we're totally ready ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); m_log.DebugFormat("[CompleteMovement] MoveAgentIntoRegion: {0}ms", Util.EnvironmentTickCountSubtract(ts)); + if (!string.IsNullOrEmpty(m_callbackURI)) { // We cannot sleep here since this would hold up the inbound packet processing thread, as @@ -2107,12 +2106,28 @@ namespace OpenSim.Region.Framework.Scenes // client.Name, client.AgentId, m_scene.RegionInfo.RegionName); // } + m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); + + if(m_teleportFlags > 0) //sanity check + gotCrossUpdate = false; + + if(!gotCrossUpdate) + RotateToLookAt(look); + + // start sending terrain patchs if (!gotCrossUpdate && !isNPC) Scene.SendLayerData(ControllingClient); + // HG delay + if((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0) + { + Thread.Sleep(500); + m_log.DebugFormat("[CompleteMovement] HG delay: {0}ms", Util.EnvironmentTickCountSubtract(ts)); + } + m_previusParcelHide = false; m_previusParcelUUID = UUID.Zero; m_currentParcelHide = false;