From ab3afd5f42593cb6f5475af36accdd1f01962fd1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 5 Jun 2010 09:39:09 -0700 Subject: * Bug fix in TP home: typo in unpacking of GridUserInfo. * Bug fix in TPs across neighboring regions: bug was introduced when getting rid of crashed sessions. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 11 +++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++ 2 files changed, 13 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ef37f63..1e3e0c9 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -410,6 +410,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer teleportFlags, capsPath); } + // Let's set this to true tentatively. This does not trigger OnChildAgent + sp.IsChildAgent = true; + // TeleportFinish makes the client send CompleteMovementIntoRegion (at the destination), which // trigers a whole shebang of things there, including MakeRoot. So let's wait for confirmation // that the client contacted the destination before we send the attachments and close things here. @@ -418,6 +421,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Client never contacted destination. Let's restore everything back sp.ControllingClient.SendTeleportFailed("Problems connecting to destination."); + // Fail. Reset it back + sp.IsChildAgent = false; + ResetFromTransit(sp.UUID); // Yikes! We should just have a ref to scene here. @@ -436,7 +442,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer KillEntity(sp.Scene, sp.LocalId); + // Now let's make it officially a child agent sp.MakeChildAgent(); + // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone if (NeedsClosing(oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) @@ -538,6 +546,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer client.SendTeleportFailed("Your home region could not be found."); return; } + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", + regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); + // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... ((Scene)(client.Scene)).RequestTeleportLocation( client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6300665..3948f14 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3990,7 +3990,9 @@ namespace OpenSim.Region.Framework.Scenes // bordercross if position is outside of region if (!result) + { regionHandle = m_regInfo.RegionHandle; + } else { // not in this region, undo the shift! -- cgit v1.1