more on TP

0.9.1.0-post-fixes
UbitUmarov 2019-01-14 18:39:16 +00:00
parent 3cf9a257f7
commit df14ed7d31
3 changed files with 16 additions and 16 deletions

View File

@ -1099,7 +1099,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
ulong destinationHandle = finalDestination.RegionHandle; ulong destinationHandle = finalDestination.RegionHandle;
List<ulong> childRegionsToClose = null; List<ulong> childRegionsToClose = null;
if (ctx.OutboundVersion < 0.7) if (ctx.OutboundVersion < 0.7f)
{ {
childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
@ -1226,7 +1226,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Now let's make it officially a child agent // Now let's make it officially a child agent
sp.MakeChildAgent(destinationHandle); sp.MakeChildAgent(destinationHandle);
if(ctx.OutboundVersion < 0.7) if(ctx.OutboundVersion < 0.7f)
{ {
if (logout) if (logout)
sp.closeAllChildAgents(); sp.closeAllChildAgents();
@ -1249,8 +1249,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
"[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
sp.Scene.CloseAgent(sp.UUID, false); sp.Scene.CloseAgent(sp.UUID, false);
} }
sp.IsInTransit = false;
} }
sp.IsInTransit = false;
} }
/// <summary> /// <summary>
@ -2077,7 +2077,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
List<AgentCircuitData> cagents = new List<AgentCircuitData>(); List<AgentCircuitData> cagents = new List<AgentCircuitData>();
List<ulong> newneighbours = new List<ulong>(); List<ulong> newneighbours = new List<ulong>();
bool notHG = (sp.TeleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0; bool notHG = (sp.TeleportFlags & Constants.TeleportFlags.ViaHGLogin) == 0;
foreach (GridRegion neighbour in neighbours) foreach (GridRegion neighbour in neighbours)
{ {
@ -2120,12 +2120,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
cagents.Add(agent); cagents.Add(agent);
} }
if (previousRegionNeighbourHandles.Contains(currentRegionHandler))
previousRegionNeighbourHandles.Remove(currentRegionHandler);
// previousRegionNeighbourHandles now contains regions to forget // previousRegionNeighbourHandles now contains regions to forget
foreach (ulong handler in previousRegionNeighbourHandles) if (previousRegionNeighbourHandles.Count > 0)
seeds.Remove(handler); {
if (previousRegionNeighbourHandles.Contains(currentRegionHandler))
previousRegionNeighbourHandles.Remove(currentRegionHandler);
foreach (ulong handler in previousRegionNeighbourHandles)
seeds.Remove(handler);
List<ulong> toclose = new List<ulong>(previousRegionNeighbourHandles);
sp.CloseChildAgents(toclose);
}
/// Update all child agent with everyone's seeds /// Update all child agent with everyone's seeds
// foreach (AgentCircuitData a in cagents) // foreach (AgentCircuitData a in cagents)
@ -2137,7 +2143,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
sp.KnownRegions = seeds; sp.KnownRegions = seeds;
sp.SetNeighbourRegionSizeInfo(neighbours); sp.SetNeighbourRegionSizeInfo(neighbours);
if(neighbours.Count > 0) if (neighbours.Count > 0)
{ {
AgentPosition agentpos = new AgentPosition(); AgentPosition agentpos = new AgentPosition();
agentpos.AgentID = new UUID(sp.UUID.Guid); agentpos.AgentID = new UUID(sp.UUID.Guid);
@ -2159,12 +2165,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
int count = 0; int count = 0;
IPEndPoint ipe; IPEndPoint ipe;
if(previousRegionNeighbourHandles.Count > 0)
{
List<ulong> toclose = new List<ulong>(previousRegionNeighbourHandles);
sp.CloseChildAgents(toclose);
}
foreach (GridRegion neighbour in neighbours) foreach (GridRegion neighbour in neighbours)
{ {
ulong handler = neighbour.RegionHandle; ulong handler = neighbour.RegionHandle;

Binary file not shown.