Minor improvements on TP V1 trying to make it exactly as it was before.
parent
df09fdf65d
commit
d70a0c09cb
|
@ -697,6 +697,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
ulong destinationHandle = finalDestination.RegionHandle;
|
ulong destinationHandle = finalDestination.RegionHandle;
|
||||||
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
||||||
|
|
||||||
|
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Using TP V1");
|
||||||
// Let's create an agent there if one doesn't exist yet.
|
// Let's create an agent there if one doesn't exist yet.
|
||||||
// NOTE: logout will always be false for a non-HG teleport.
|
// NOTE: logout will always be false for a non-HG teleport.
|
||||||
bool logout = false;
|
bool logout = false;
|
||||||
|
@ -736,7 +737,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
// Past this point we have to attempt clean up if the teleport fails, so update transfer state.
|
// Past this point we have to attempt clean up if the teleport fails, so update transfer state.
|
||||||
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
|
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
|
||||||
|
|
||||||
|
// OK, it got this agent. Let's close some child agents
|
||||||
|
sp.CloseChildAgents(newRegionX, newRegionY);
|
||||||
|
|
||||||
IClientIPEndpoint ipepClient;
|
IClientIPEndpoint ipepClient;
|
||||||
string capsPath = String.Empty;
|
string capsPath = String.Empty;
|
||||||
if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
|
if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
|
||||||
|
@ -811,17 +815,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
// closes our existing agent which is still signalled as root.
|
// closes our existing agent which is still signalled as root.
|
||||||
sp.IsChildAgent = true;
|
sp.IsChildAgent = true;
|
||||||
|
|
||||||
// New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid
|
|
||||||
if (m_eqModule != null)
|
|
||||||
{
|
|
||||||
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4,
|
|
||||||
teleportFlags, capsPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
// A common teleport failure occurs when we can send CreateAgent to the
|
// A common teleport failure occurs when we can send CreateAgent to the
|
||||||
// destination region but the viewer cannot establish the connection (e.g. due to network issues between
|
// destination region but the viewer cannot establish the connection (e.g. due to network issues between
|
||||||
// the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
|
// the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
|
||||||
|
@ -847,6 +840,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OK, send TPFinish to the client, so that it starts the process of contacting the destination region
|
||||||
|
if (m_eqModule != null)
|
||||||
|
{
|
||||||
|
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4,
|
||||||
|
teleportFlags, capsPath);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling)
|
if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Cancelling)
|
||||||
{
|
{
|
||||||
m_interRegionTeleportCancels.Value++;
|
m_interRegionTeleportCancels.Value++;
|
||||||
|
@ -908,9 +912,6 @@ 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();
|
sp.MakeChildAgent();
|
||||||
|
|
||||||
// OK, it got this agent. Let's close some child agents
|
|
||||||
sp.CloseChildAgents(newRegionX, newRegionY);
|
|
||||||
|
|
||||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
||||||
|
|
||||||
if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
|
if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
|
||||||
|
@ -1063,6 +1064,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
/// <param name='finalDestination'></param>
|
/// <param name='finalDestination'></param>
|
||||||
protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination)
|
protected virtual void CleanupFailedInterRegionTeleport(ScenePresence sp, string auth_token, GridRegion finalDestination)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[ZZZ]: FAIL!");
|
||||||
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
||||||
|
|
||||||
if (sp.IsChildAgent) // We had set it to child before attempted TP (V1)
|
if (sp.IsChildAgent) // We had set it to child before attempted TP (V1)
|
||||||
|
|
Loading…
Reference in New Issue