diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 13 |
1 files changed, 12 insertions, 1 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; |