diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 5 |
2 files changed, 16 insertions, 2 deletions
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 | |||
1213 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); | 1213 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); |
1214 | agent.BaseFolder = UUID.Zero; | 1214 | agent.BaseFolder = UUID.Zero; |
1215 | agent.InventoryFolder = UUID.Zero; | 1215 | agent.InventoryFolder = UUID.Zero; |
1216 | agent.startpos = new Vector3(128, 128, 70); | 1216 | agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, neighbour); |
1217 | agent.child = true; | 1217 | agent.child = true; |
1218 | agent.Appearance = sp.Appearance; | 1218 | agent.Appearance = sp.Appearance; |
1219 | if (currentAgentCircuit != null) | 1219 | if (currentAgentCircuit != null) |
@@ -1305,6 +1305,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1305 | } | 1305 | } |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour) | ||
1309 | { | ||
1310 | int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX; | ||
1311 | int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY; | ||
1312 | int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize; | ||
1313 | int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize; | ||
1314 | int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize; | ||
1315 | int shifty = (rRegionY - tRegionY) * (int)Constants.RegionSize; | ||
1316 | return new Vector3(shiftx, shifty, 0f); | ||
1317 | } | ||
1318 | |||
1308 | private void InformClientOfNeighbourCompleted(IAsyncResult iar) | 1319 | private void InformClientOfNeighbourCompleted(IAsyncResult iar) |
1309 | { | 1320 | { |
1310 | InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState; | 1321 | InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState; |
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 | |||
123 | { | 123 | { |
124 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID); | 124 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region {0} is hyperlink", region.RegionID); |
125 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); | 125 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); |
126 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); | 126 | if (real_destination != null) |
127 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); | ||
128 | else | ||
129 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion to Gatekeeper {0} failed", region.ServerURI); | ||
127 | return real_destination; | 130 | return real_destination; |
128 | } | 131 | } |
129 | return region; | 132 | return region; |