diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d0171fe..8268bfa 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -239,12 +239,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
239 | //avatar.Scene.RemoveCapsHandler(avatar.UUID); | 239 | //avatar.Scene.RemoveCapsHandler(avatar.UUID); |
240 | 240 | ||
241 | string capsPath = String.Empty; | 241 | string capsPath = String.Empty; |
242 | |||
243 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | ||
242 | AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo(); | 244 | AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo(); |
243 | agentCircuit.BaseFolder = UUID.Zero; | ||
244 | agentCircuit.InventoryFolder = UUID.Zero; | ||
245 | agentCircuit.startpos = position; | 245 | agentCircuit.startpos = position; |
246 | agentCircuit.child = true; | 246 | agentCircuit.child = true; |
247 | agentCircuit.Appearance = sp.Appearance; | 247 | agentCircuit.Appearance = sp.Appearance; |
248 | if (currentAgentCircuit != null) | ||
249 | agentCircuit.ServiceURLs = currentAgentCircuit.ServiceURLs; | ||
248 | 250 | ||
249 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) | 251 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) |
250 | { | 252 | { |
@@ -255,9 +257,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
255 | string reason = String.Empty; | 257 | string reason = String.Empty; |
256 | 258 | ||
257 | // Let's create an agent there if one doesn't exist yet. | 259 | // Let's create an agent there if one doesn't exist yet. |
258 | if (!m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason)) | 260 | if (!CreateAgent(reg, finalDestination, agentCircuit, teleportFlags, out reason)) |
259 | { | 261 | { |
260 | sp.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", | 262 | sp.ControllingClient.SendTeleportFailed(String.Format("Destination refused: {0}", |
261 | reason)); | 263 | reason)); |
262 | return; | 264 | return; |
263 | } | 265 | } |
@@ -345,8 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
345 | agent.CallbackURI = "http://" + sp.Scene.RegionInfo.ExternalHostName + ":" + sp.Scene.RegionInfo.HttpPort + | 347 | agent.CallbackURI = "http://" + sp.Scene.RegionInfo.ExternalHostName + ":" + sp.Scene.RegionInfo.HttpPort + |
346 | "/agent/" + sp.UUID.ToString() + "/" + sp.Scene.RegionInfo.RegionID.ToString() + "/release/"; | 348 | "/agent/" + sp.UUID.ToString() + "/" + sp.Scene.RegionInfo.RegionID.ToString() + "/release/"; |
347 | 349 | ||
348 | // Straight to the region. Safe. | 350 | UpdateAgent(reg, finalDestination, agent); |
349 | m_aScene.SimulationService.UpdateAgent(reg, agent); | ||
350 | 351 | ||
351 | m_log.DebugFormat( | 352 | m_log.DebugFormat( |
352 | "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID); | 353 | "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID); |
@@ -444,6 +445,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
444 | } | 445 | } |
445 | } | 446 | } |
446 | 447 | ||
448 | protected virtual bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | ||
449 | { | ||
450 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | ||
451 | } | ||
452 | |||
453 | protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) | ||
454 | { | ||
455 | return m_aScene.SimulationService.UpdateAgent(reg, agent); | ||
456 | } | ||
457 | |||
447 | protected void KillEntity(Scene scene, uint localID) | 458 | protected void KillEntity(Scene scene, uint localID) |
448 | { | 459 | { |
449 | scene.SendKillObject(localID); | 460 | scene.SendKillObject(localID); |