diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs index 0e7be7de3d..e63629e680 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs @@ -142,8 +142,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests // We must update the scenes in order to make the root new root agents trigger position updates in their // children. - sceneWest.Update(3); - sceneEast.Update(3); + sceneWest.Update(4); + sceneEast.Update(4); + sp1.DrawDistance += 64; + sp2.DrawDistance += 64; + sceneWest.Update(2); + sceneEast.Update(2); // Check child positions are correct. Assert.AreEqual( @@ -233,8 +237,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests // We must update the scenes in order to make the root new root agents trigger position updates in their // children. - sceneNorth.Update(3); - sceneSouth.Update(3); + sceneNorth.Update(4); + sceneSouth.Update(4); + sp1.DrawDistance += 64; + sp2.DrawDistance += 64; + sceneNorth.Update(2); + sceneSouth.Update(2); // Check child positions are correct. Assert.AreEqual( diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 12887fbced..c71d20d2c8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2168,8 +2168,11 @@ namespace OpenSim.Region.Framework.Scenes m_inTransit = false; // Tell the client that we're ready to send rest - m_gotRegionHandShake = false; // allow it - ControllingClient.SendRegionHandshake(); + if (!gotCrossUpdate) + { + m_gotRegionHandShake = false; // allow it if not a crossing + ControllingClient.SendRegionHandshake(); + } ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); @@ -2300,6 +2303,22 @@ namespace OpenSim.Region.Framework.Scenes if (!IsNPC) { + if(gotCrossUpdate) + { + // Create child agents in neighbouring regions + IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); + if (m_agentTransfer != null) + { + m_agentTransfer.EnableChildAgents(this); + } + + m_lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000; + m_lastChildAgentUpdatePosition = AbsolutePosition; + m_lastChildAgentUpdateDrawDistance = DrawDistance; + + m_lastChildAgentUpdateGodLevel = GodController.ViwerUIGodLevel; + m_childUpdatesBusy = false; // allow them + } // send the rest of the world if (m_teleportFlags > 0 || m_currentParcelHide) //SendInitialDataToMe(); @@ -4001,8 +4020,8 @@ namespace OpenSim.Region.Framework.Scenes Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); m_callbackURI = null; - NeedInitialData = 4; - return; + //NeedInitialData = 4; + //return; } // v0.7 close HG sender region if (!string.IsNullOrEmpty(m_newCallbackURI)) @@ -4018,8 +4037,8 @@ namespace OpenSim.Region.Framework.Scenes Scene.SimulationService.ReleaseAgent(originID, UUID, m_newCallbackURI); m_newCallbackURI = null; - NeedInitialData = 4; - return; + //NeedInitialData = 4; + //return; } // Create child agents in neighbouring regions