From b5fcb5e872ec138ff7138906bffae193b6dae1a6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 17 Jan 2010 20:10:42 -0800 Subject: HG teleports through gatekeeper are working. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 8268bfa..622d057 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -344,8 +344,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer AgentData agent = new AgentData(); sp.CopyTo(agent); agent.Position = position; - agent.CallbackURI = "http://" + sp.Scene.RegionInfo.ExternalHostName + ":" + sp.Scene.RegionInfo.HttpPort + - "/agent/" + sp.UUID.ToString() + "/" + sp.Scene.RegionInfo.RegionID.ToString() + "/release/"; + SetCallbackURL(agent, sp.Scene.RegionInfo); UpdateAgent(reg, finalDestination, agent); @@ -379,7 +378,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer EnableChildAgents(sp); // Finally, kill the agent we just created at the destination. - m_aScene.SimulationService.CloseAgent(reg, sp.UUID); + m_aScene.SimulationService.CloseAgent(finalDestination, sp.UUID); return; } @@ -389,7 +388,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sp.MakeChildAgent(); // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it - CrossAttachmentsIntoNewRegion(reg, sp, true); + CrossAttachmentsIntoNewRegion(finalDestination, sp, true); // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone @@ -447,12 +446,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer protected virtual bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) { - return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); + return m_aScene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); } protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) { - return m_aScene.SimulationService.UpdateAgent(reg, agent); + return m_aScene.SimulationService.UpdateAgent(finalDestination, agent); + } + + protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) + { + agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort + + "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; + } protected void KillEntity(Scene scene, uint localID) -- cgit v1.1