From 6ae7341e422174f29b92be54e7e6c5a4979d7b33 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 1 Oct 2015 20:50:12 +0100 Subject: send DisableSimulator messages on closing childagents. Possible still not on at best timming, or on the right source files --- .../Framework/EntityTransfer/EntityTransferModule.cs | 12 +++++++++--- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 902ae22..4126b3b 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1112,7 +1112,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // This sleep can be increased if necessary. However, whilst it's active, // an agent cannot teleport back to this region if it has teleported away. Thread.Sleep(2000); - + if (m_eqModule != null) + m_eqModule.DisableSimulator(sp.RegionHandle,sp.UUID); + Thread.Sleep(500); sp.Scene.CloseAgent(sp.UUID, false); } } @@ -1256,8 +1258,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // BEFORE THEY SETTLE IN THE NEW REGION. // DECREASING THE WAIT TIME HERE WILL EITHER RESULT IN A VIEWER CRASH OR // IN THE AVIE BEING PLACED IN INFINITY FOR A COUPLE OF SECONDS. - Thread.Sleep(15000); - + + Thread.Sleep(14000); + if (m_eqModule != null) + m_eqModule.DisableSimulator(sp.RegionHandle,sp.UUID); + Thread.Sleep(1000); + // OK, it got this agent. Let's close everything // If we shouldn't close the agent due to some other region renewing the connection // then this will be handled in IncomingCloseAgent under lock conditions diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9996f6e..c3deeaf 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4076,6 +4076,9 @@ namespace OpenSim.Region.Framework.Scenes uint x, y; spRegionSizeInfo regInfo; + // this should not be here + IEventQueue eventQueue = Scene.RequestModuleInterface(); + foreach (ulong handle in knownRegions) { // Don't close the agent on this region yet @@ -4095,6 +4098,9 @@ namespace OpenSim.Region.Framework.Scenes regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) { byebyeRegions.Add(handle); + // this should not be here + if(eventQueue != null) + eventQueue.DisableSimulator(handle,UUID); } } else @@ -4103,6 +4109,9 @@ namespace OpenSim.Region.Framework.Scenes (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY)) { byebyeRegions.Add(handle); + // this should not be here + if(eventQueue != null) + eventQueue.DisableSimulator(handle,UUID); } } } -- cgit v1.1