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 ++ .../Services/Connectors/GridUser/GridUserServiceConnector.cs | 2 -- OpenSim/Services/Interfaces/IGridUserService.cs | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) (limited to 'OpenSim') 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! diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs index 600ddfd..935ebb1 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs @@ -206,9 +206,7 @@ namespace OpenSim.Services.Connectors if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null)) { if (replyData["result"] is Dictionary) - { guinfo = new GridUserInfo((Dictionary)replyData["result"]); - } } return guinfo; diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs index e629dff..95ce5e8 100644 --- a/OpenSim/Services/Interfaces/IGridUserService.cs +++ b/OpenSim/Services/Interfaces/IGridUserService.cs @@ -65,7 +65,7 @@ namespace OpenSim.Services.Interfaces Vector3.TryParse(kvp["HomeLookAt"].ToString(), out HomeLookAt); if (kvp.ContainsKey("LastRegionID")) - UUID.TryParse(kvp["LastRegionID"].ToString(), out HomeRegionID); + UUID.TryParse(kvp["LastRegionID"].ToString(), out LastRegionID); if (kvp.ContainsKey("LastPosition")) Vector3.TryParse(kvp["LastPosition"].ToString(), out LastPosition); if (kvp.ContainsKey("LastLookAt")) -- cgit v1.1