From 7e4a2d69d56713cbe77da4c1e5718be9bb423647 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Dec 2011 08:48:29 -0800 Subject: HG minor bug fix and marked one method obsolete in UAS. --- .../CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index a87279a..cc9ba97 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -123,7 +123,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID); GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); - m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); + if (real_destination != null) + m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); + else + m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion to Gatekeeper {0} failed", region.ServerURI); return real_destination; } return region; -- cgit v1.1 From 8300bb651e3d1b3c41bc7923cefde3f3ea96923d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Dec 2011 09:33:22 -0800 Subject: Sends the consistent child agent position upon creation of the child agent in other regions, as opposed to <128, 128, 70> --- .../Framework/EntityTransfer/EntityTransferModule.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 2f947fd..87f292c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1213,7 +1213,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); agent.BaseFolder = UUID.Zero; agent.InventoryFolder = UUID.Zero; - agent.startpos = new Vector3(128, 128, 70); + agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, neighbour); agent.child = true; agent.Appearance = sp.Appearance; if (currentAgentCircuit != null) @@ -1305,6 +1305,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } + Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour) + { + int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX; + int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY; + int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize; + int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize; + int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize; + int shifty = (rRegionY - tRegionY) * (int)Constants.RegionSize; + return new Vector3(shiftx, shifty, 0f); + } + private void InformClientOfNeighbourCompleted(IAsyncResult iar) { InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState; -- cgit v1.1