aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index f7470bd..53be68f 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -111,6 +111,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
111 /// </remarks> 111 /// </remarks>
112 private Stat m_interRegionTeleportFailures; 112 private Stat m_interRegionTeleportFailures;
113 113
114 protected string m_ThisHomeURI;
115
114 protected bool m_Enabled = false; 116 protected bool m_Enabled = false;
115 117
116 public Scene Scene { get; private set; } 118 public Scene Scene { get; private set; }
@@ -207,6 +209,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
207 string transferVersionName = "SIMULATION"; 209 string transferVersionName = "SIMULATION";
208 float maxTransferVersion = 0.2f; 210 float maxTransferVersion = 0.2f;
209 211
212 IConfig hypergridConfig = source.Configs["Hypergrid"];
213 if (hypergridConfig != null)
214 {
215 m_ThisHomeURI = hypergridConfig.GetString("HomeURI", string.Empty);
216 if (m_ThisHomeURI != string.Empty && !m_ThisHomeURI.EndsWith("/"))
217 m_ThisHomeURI += '/';
218 }
219
210 IConfig transferConfig = source.Configs["EntityTransfer"]; 220 IConfig transferConfig = source.Configs["EntityTransfer"];
211 if (transferConfig != null) 221 if (transferConfig != null)
212 { 222 {
@@ -1296,8 +1306,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1296 1306
1297 protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) 1307 protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout)
1298 { 1308 {
1309 GridRegion source = new GridRegion(Scene.RegionInfo);
1310 source.RawServerURI = m_ThisHomeURI;
1311
1299 logout = false; 1312 logout = false;
1300 bool success = Scene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); 1313 bool success = Scene.SimulationService.CreateAgent(source, finalDestination, agentCircuit, teleportFlags, out reason);
1301 1314
1302 if (success) 1315 if (success)
1303 sp.Scene.EventManager.TriggerTeleportStart(sp.ControllingClient, reg, finalDestination, teleportFlags, logout); 1316 sp.Scene.EventManager.TriggerTeleportStart(sp.ControllingClient, reg, finalDestination, teleportFlags, logout);
@@ -2262,7 +2275,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2262 Thread.Sleep(500); 2275 Thread.Sleep(500);
2263 2276
2264 Scene scene = sp.Scene; 2277 Scene scene = sp.Scene;
2265 2278
2266 m_log.DebugFormat( 2279 m_log.DebugFormat(
2267 "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})", 2280 "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})",
2268 sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY); 2281 sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY);
@@ -2271,7 +2284,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2271 2284
2272 string reason = String.Empty; 2285 string reason = String.Empty;
2273 2286
2274 bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); 2287 bool regionAccepted = scene.SimulationService.CreateAgent(null, reg, a, (uint)TeleportFlags.Default, out reason);
2275 2288
2276 if (regionAccepted && newAgent) 2289 if (regionAccepted && newAgent)
2277 { 2290 {