diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d770d45cc5..2f2034f0ff 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1099,7 +1099,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ulong destinationHandle = finalDestination.RegionHandle; List childRegionsToClose = null; - if (ctx.OutboundVersion < 0.7f) + // HG needs a deeper change + bool localclose = (ctx.OutboundVersion < 0.7f || ((teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)); + if (localclose) { childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); @@ -1226,7 +1228,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Now let's make it officially a child agent sp.MakeChildAgent(destinationHandle); - if(ctx.OutboundVersion < 0.7f) + if(localclose) { if (logout) sp.closeAllChildAgents(); @@ -2129,8 +2131,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer foreach (ulong handler in previousRegionNeighbourHandles) seeds.Remove(handler); - List toclose = new List(previousRegionNeighbourHandles); - sp.CloseChildAgents(toclose); + if(notHG) // does not work on HG + { + List toclose = new List(previousRegionNeighbourHandles); + sp.CloseChildAgents(toclose); + } } /// Update all child agent with everyone's seeds