test a change to TP protocol
parent
8bb644159e
commit
31ec5dde45
|
@ -85,8 +85,8 @@ namespace OpenSim
|
||||||
/// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
/// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public readonly static float SimulationServiceVersionAcceptedMin = 0.3f;
|
public readonly static float SimulationServiceVersionAcceptedMin = 0.3f;
|
||||||
public readonly static float SimulationServiceVersionAcceptedMax = 0.6f;
|
public readonly static float SimulationServiceVersionAcceptedMax = 0.7f;
|
||||||
public readonly static float SimulationServiceVersionSupportedMin = 0.3f;
|
public readonly static float SimulationServiceVersionSupportedMin = 0.3f;
|
||||||
public readonly static float SimulationServiceVersionSupportedMax = 0.6f;
|
public readonly static float SimulationServiceVersionSupportedMax = 0.7f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1098,13 +1098,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
ulong destinationHandle = finalDestination.RegionHandle;
|
ulong destinationHandle = finalDestination.RegionHandle;
|
||||||
|
|
||||||
List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
List<ulong> childRegionsToClose = null;
|
||||||
|
if (ctx.OutboundVersion < 0.7)
|
||||||
if(agentCircuit.ChildrenCapSeeds != null)
|
|
||||||
{
|
{
|
||||||
foreach(ulong handler in childRegionsToClose)
|
childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||||
|
|
||||||
|
if(agentCircuit.ChildrenCapSeeds != null)
|
||||||
{
|
{
|
||||||
agentCircuit.ChildrenCapSeeds.Remove(handler);
|
foreach(ulong handler in childRegionsToClose)
|
||||||
|
{
|
||||||
|
agentCircuit.ChildrenCapSeeds.Remove(handler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1214,47 +1218,37 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
/* now some viewers also need time bf closing child regions
|
|
||||||
* so this is moved down and delay added
|
|
||||||
|
|
||||||
if (logout)
|
|
||||||
sp.closeAllChildAgents();
|
|
||||||
else
|
|
||||||
sp.CloseChildAgents(childRegionsToClose);
|
|
||||||
*/
|
|
||||||
|
|
||||||
sp.HasMovedAway(!(OutSideViewRange || logout));
|
sp.HasMovedAway(!(OutSideViewRange || logout));
|
||||||
|
|
||||||
//HG hook
|
//HG hook
|
||||||
AgentHasMovedAway(sp, logout);
|
AgentHasMovedAway(sp, logout);
|
||||||
|
|
||||||
// ulong sourceRegionHandle = sp.RegionHandle;
|
|
||||||
|
|
||||||
// Now let's make it officially a child agent
|
// Now let's make it officially a child agent
|
||||||
sp.MakeChildAgent(destinationHandle);
|
sp.MakeChildAgent(destinationHandle);
|
||||||
|
|
||||||
Thread.Sleep(2800);
|
if(ctx.OutboundVersion < 0.7)
|
||||||
|
|
||||||
if (logout)
|
|
||||||
sp.closeAllChildAgents();
|
|
||||||
else
|
|
||||||
sp.CloseChildAgents(childRegionsToClose);
|
|
||||||
|
|
||||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
|
||||||
// goes by HG hook
|
|
||||||
if (NeedsClosing(reg, OutSideViewRange))
|
|
||||||
{
|
{
|
||||||
if (!sp.Scene.IncomingPreCloseClient(sp))
|
if (logout)
|
||||||
|
sp.closeAllChildAgents();
|
||||||
|
else
|
||||||
|
sp.CloseChildAgents(childRegionsToClose);
|
||||||
|
|
||||||
|
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
||||||
|
// goes by HG hook
|
||||||
|
if (NeedsClosing(reg, OutSideViewRange))
|
||||||
{
|
{
|
||||||
sp.IsInTransit = false;
|
if (!sp.Scene.IncomingPreCloseClient(sp))
|
||||||
return;
|
{
|
||||||
}
|
sp.IsInTransit = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// viewers and target region take extra time to process the tp
|
// viewers and target region take extra time to process the tp
|
||||||
// Thread.Sleep(2000);
|
Thread.Sleep(15000);
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[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;
|
||||||
}
|
}
|
||||||
|
@ -2083,11 +2077,13 @@ 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;
|
||||||
|
|
||||||
foreach (GridRegion neighbour in neighbours)
|
foreach (GridRegion neighbour in neighbours)
|
||||||
{
|
{
|
||||||
ulong handler = neighbour.RegionHandle;
|
ulong handler = neighbour.RegionHandle;
|
||||||
|
|
||||||
if (previousRegionNeighbourHandles.Contains(handler))
|
if (notHG && previousRegionNeighbourHandles.Contains(handler))
|
||||||
{
|
{
|
||||||
// agent already knows this region
|
// agent already knows this region
|
||||||
previousRegionNeighbourHandles.Remove(handler);
|
previousRegionNeighbourHandles.Remove(handler);
|
||||||
|
@ -2163,6 +2159,12 @@ 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;
|
||||||
|
@ -2179,7 +2181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
else if (!previousRegionNeighbourHandles.Contains(handler))
|
else if (notHG && !previousRegionNeighbourHandles.Contains(handler))
|
||||||
{
|
{
|
||||||
spScene.SimulationService.UpdateAgent(neighbour, agentpos);
|
spScene.SimulationService.UpdateAgent(neighbour, agentpos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue