diff options
author | Robert Adams | 2014-01-28 08:49:22 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-28 08:49:22 -0800 |
commit | 4faf11e00158828ee46e0ed72d7d6821419a432f (patch) | |
tree | 257b6da882ee57495a7cac0f9e8425ee9eb01ee4 /OpenSim | |
parent | varregion: enable teleporting to a varregion by clicking on the map and (diff) | |
download | opensim-SC_OLD-4faf11e00158828ee46e0ed72d7d6821419a432f.zip opensim-SC_OLD-4faf11e00158828ee46e0ed72d7d6821419a432f.tar.gz opensim-SC_OLD-4faf11e00158828ee46e0ed72d7d6821419a432f.tar.bz2 opensim-SC_OLD-4faf11e00158828ee46e0ed72d7d6821419a432f.tar.xz |
varregion: fix for teleporting by double clicking on a map location.
Thanks Garmin.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6861f5b..585cdc4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -8942,6 +8942,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8942 | TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest; | 8942 | TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest; |
8943 | if (handlerTeleportLocationRequest != null) | 8943 | if (handlerTeleportLocationRequest != null) |
8944 | { | 8944 | { |
8945 | // Adjust teleport location to base of a larger region if requested to teleport to a sub-region | ||
8946 | uint locX, locY; | ||
8947 | Util.RegionHandleToWorldLoc(tpLocReq.Info.RegionHandle, out locX, out locY); | ||
8948 | if ((locX >= m_scene.RegionInfo.WorldLocX) | ||
8949 | && (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX)) | ||
8950 | && (locY >= m_scene.RegionInfo.WorldLocY) | ||
8951 | && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)) ) | ||
8952 | { | ||
8953 | tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
8954 | tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX; | ||
8955 | tpLocReq.Info.Position.Y += locY - m_scene.RegionInfo.WorldLocY; | ||
8956 | } | ||
8957 | |||
8945 | handlerTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, | 8958 | handlerTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, |
8946 | tpLocReq.Info.LookAt, 16); | 8959 | tpLocReq.Info.LookAt, 16); |
8947 | } | 8960 | } |