aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorDiva Canto2010-01-17 18:04:55 -0800
committerDiva Canto2010-01-17 18:04:55 -0800
commitb2e6ec9e12ad07eb08496ebe8ca0476b793017d5 (patch)
treeac72f03b9cfca6f344d697f6d7581e5147ccf450 /OpenSim/Region/CoreModules/Framework
parentOops, forgot this one. (diff)
downloadopensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.zip
opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.gz
opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.bz2
opensim-SC_OLD-b2e6ec9e12ad07eb08496ebe8ca0476b793017d5.tar.xz
Agent gets there through the Gatekeeper, but still a few quirks to fix.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs23
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs27
2 files changed, 44 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);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 5d88311..e5a862d 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31 31
32using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 34using OpenSim.Region.Framework.Scenes;
34using OpenSim.Services.Connectors.Hypergrid; 35using OpenSim.Services.Connectors.Hypergrid;
@@ -58,6 +59,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
58 } 59 }
59 } 60 }
60 61
62 private GatekeeperServiceConnector m_GatekeeperConnector;
63
61 #region ISharedRegionModule 64 #region ISharedRegionModule
62 65
63 public override string Name 66 public override string Name
@@ -74,6 +77,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
74 if (name == Name) 77 if (name == Name)
75 { 78 {
76 m_agentsInTransit = new List<UUID>(); 79 m_agentsInTransit = new List<UUID>();
80 m_GatekeeperConnector = new GatekeeperServiceConnector();
77 m_Enabled = true; 81 m_Enabled = true;
78 m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); 82 m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name);
79 } 83 }
@@ -131,6 +135,29 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
131 return true; 135 return true;
132 } 136 }
133 137
138 protected override bool CreateAgent(GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason)
139 {
140 reason = string.Empty;
141 if (reg.RegionLocX != finalDestination.RegionLocX && reg.RegionLocY != finalDestination.RegionLocY)
142 {
143 // this user is going to another grid
144 reg.RegionName = finalDestination.RegionName;
145 return m_GatekeeperConnector.CreateAgent(reg, agentCircuit, teleportFlags, out reason);
146 }
147
148 return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason);
149 }
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 }
134 161
135 #endregion 162 #endregion
136 } 163 }