aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Hypergrid
diff options
context:
space:
mode:
authordiva2009-01-01 19:42:24 +0000
committerdiva2009-01-01 19:42:24 +0000
commitd8ebf2fc9d7d2e50735d50e75f7153f487efe958 (patch)
treec14d5e80e3d34d0a2f547cb3d0b965dea8e55e90 /OpenSim/Region/Environment/Scenes/Hypergrid
parentMinor fix for HG request neighbors. Should not return hyperlink neighbors, on... (diff)
downloadopensim-SC_OLD-d8ebf2fc9d7d2e50735d50e75f7153f487efe958.zip
opensim-SC_OLD-d8ebf2fc9d7d2e50735d50e75f7153f487efe958.tar.gz
opensim-SC_OLD-d8ebf2fc9d7d2e50735d50e75f7153f487efe958.tar.bz2
opensim-SC_OLD-d8ebf2fc9d7d2e50735d50e75f7153f487efe958.tar.xz
Major changes in interregion communications. This breaks compatibility with older versions, and may result is all sorts of weirdnesses when interacting with sims in older versions. Changes:
- Introducing synchronous Teleports. Now the receiving region calls back the sending region after the client has been made a root agent there, that is, after client sends CompleteMovement to the destination. - SendCloseAgent moved from OGS1 Remoting to RESTComms.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Hypergrid')
-rw-r--r--OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs34
1 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
index bcd378f..abf4065 100644
--- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs
@@ -256,15 +256,16 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid
256 // return; 256 // return;
257 //} 257 //}
258 258
259 SetInTransit(avatar.UUID);
259 // Let's send a full update of the agent. This is a synchronous call. 260 // Let's send a full update of the agent. This is a synchronous call.
260 AgentData agent = new AgentData(); 261 AgentData agent = new AgentData();
261 avatar.CopyTo(agent); 262 avatar.CopyTo(agent);
262 agent.Position = new Vector3(-1, -1, -1); // this means ignore position info; UGH!!!! 263 agent.Position = new Vector3(-1, -1, -1); // this means ignore position info; UGH!!!!
264 agent.CallbackURI = "http://" + m_regionInfo.ExternalHostName + ":" + m_regionInfo.HttpPort +
265 "/agent/" + avatar.UUID.ToString() + "/" + avatar.Scene.RegionInfo.RegionHandle.ToString() + "/release/";
263 266
264 m_interregionCommsOut.SendChildAgentUpdate(reg.RegionHandle, agent); 267 m_interregionCommsOut.SendChildAgentUpdate(reg.RegionHandle, agent);
265 268
266 avatar.MakeChildAgent();
267
268 m_log.DebugFormat( 269 m_log.DebugFormat(
269 "[CAPS]: Sending new CAPS seed url {0} to client {1}", agentCircuit.CapsPath, avatar.UUID); 270 "[CAPS]: Sending new CAPS seed url {0} to client {1}", agentCircuit.CapsPath, avatar.UUID);
270 271
@@ -288,17 +289,32 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid
288 /// Hypergrid mod stop 289 /// Hypergrid mod stop
289 /// 290 ///
290 291
292
293 // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which
294 // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation
295 // that the client contacted the destination before we send the attachments and close things here.
296 if (!WaitForCallback(avatar.UUID))
297 {
298 // Client never contacted destination. Let's restore everything back
299 avatar.ControllingClient.SendTeleportFailed("Problems connecting to destination.");
300
301 ResetFromTransit(avatar.UUID);
302 // Yikes! We should just have a ref to scene here.
303 avatar.Scene.InformClientOfNeighbours(avatar);
304
305 // Finally, kill the agent we just created at the destination.
306 m_interregionCommsOut.SendCloseAgent(reg.RegionHandle, avatar.UUID);
307
308 return;
309 }
310
311 // Can't go back from here
291 if (KiPrimitive != null) 312 if (KiPrimitive != null)
292 { 313 {
293 KiPrimitive(avatar.LocalId); 314 KiPrimitive(avatar.LocalId);
294 } 315 }
295 316
296 // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which 317 avatar.MakeChildAgent();
297 // trigers a whole shebang of things there, including MakeRoot. So let's wait plenty before
298 // we send the attachments and close things here.
299 // It would be nice if the client would tell us when that whole thing is done, so we wouldn't have
300 // to use this Thread.Sleep voodoo
301 Thread.Sleep(4000);
302 318
303 // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it 319 // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it
304 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true); 320 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle, true);
@@ -310,7 +326,7 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid
310 /// 326 ///
311 if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY) || isHyperLink) 327 if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY) || isHyperLink)
312 { 328 {
313 Thread.Sleep(8000); 329 Thread.Sleep(5000);
314 avatar.Close(); 330 avatar.Close();
315 CloseConnection(avatar.UUID); 331 CloseConnection(avatar.UUID);
316 } 332 }