diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 11 |
2 files changed, 12 insertions, 17 deletions
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 | |||
344 | AgentData agent = new AgentData(); | 344 | AgentData agent = new AgentData(); |
345 | sp.CopyTo(agent); | 345 | sp.CopyTo(agent); |
346 | agent.Position = position; | 346 | agent.Position = position; |
347 | agent.CallbackURI = "http://" + sp.Scene.RegionInfo.ExternalHostName + ":" + sp.Scene.RegionInfo.HttpPort + | 347 | SetCallbackURL(agent, sp.Scene.RegionInfo); |
348 | "/agent/" + sp.UUID.ToString() + "/" + sp.Scene.RegionInfo.RegionID.ToString() + "/release/"; | ||
349 | 348 | ||
350 | UpdateAgent(reg, finalDestination, agent); | 349 | UpdateAgent(reg, finalDestination, agent); |
351 | 350 | ||
@@ -379,7 +378,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
379 | EnableChildAgents(sp); | 378 | EnableChildAgents(sp); |
380 | 379 | ||
381 | // Finally, kill the agent we just created at the destination. | 380 | // Finally, kill the agent we just created at the destination. |
382 | m_aScene.SimulationService.CloseAgent(reg, sp.UUID); | 381 | m_aScene.SimulationService.CloseAgent(finalDestination, sp.UUID); |
383 | 382 | ||
384 | return; | 383 | return; |
385 | } | 384 | } |
@@ -389,7 +388,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
389 | sp.MakeChildAgent(); | 388 | sp.MakeChildAgent(); |
390 | 389 | ||
391 | // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it | 390 | // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it |
392 | CrossAttachmentsIntoNewRegion(reg, sp, true); | 391 | CrossAttachmentsIntoNewRegion(finalDestination, sp, true); |
393 | 392 | ||
394 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | 393 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone |
395 | 394 | ||
@@ -447,12 +446,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
447 | 446 | ||
448 | protected virtual bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | 447 | protected virtual bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) |
449 | { | 448 | { |
450 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | 449 | return m_aScene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); |
451 | } | 450 | } |
452 | 451 | ||
453 | protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) | 452 | protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) |
454 | { | 453 | { |
455 | return m_aScene.SimulationService.UpdateAgent(reg, agent); | 454 | return m_aScene.SimulationService.UpdateAgent(finalDestination, agent); |
455 | } | ||
456 | |||
457 | protected virtual void SetCallbackURL(AgentData agent, RegionInfo region) | ||
458 | { | ||
459 | agent.CallbackURI = "http://" + region.ExternalHostName + ":" + region.HttpPort + | ||
460 | "/agent/" + agent.AgentID.ToString() + "/" + region.RegionID.ToString() + "/release/"; | ||
461 | |||
456 | } | 462 | } |
457 | 463 | ||
458 | protected void KillEntity(Scene scene, uint localID) | 464 | protected void KillEntity(Scene scene, uint localID) |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index e5a862d..6645293 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -148,17 +148,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
148 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | 148 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); |
149 | } | 149 | } |
150 | 150 | ||
151 | protected override bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) | ||
152 | { | ||
153 | if (reg.RegionLocX != finalDestination.RegionLocX && reg.RegionLocY != finalDestination.RegionLocY) | ||
154 | { | ||
155 | // this user is going to another grid | ||
156 | return m_GatekeeperConnector.UpdateAgent(reg, agent); | ||
157 | } | ||
158 | |||
159 | return m_aScene.SimulationService.UpdateAgent(reg, agent); | ||
160 | } | ||
161 | |||
162 | #endregion | 151 | #endregion |
163 | } | 152 | } |
164 | } | 153 | } |