mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
varregion: fix for teleporting by double clicking on a map location.
Thanks Garmin.
This commit is contained in:
committed by
Robert Adams
parent
49af6b53e7
commit
4faf11e001
@@ -8942,6 +8942,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest;
|
||||
if (handlerTeleportLocationRequest != null)
|
||||
{
|
||||
// Adjust teleport location to base of a larger region if requested to teleport to a sub-region
|
||||
uint locX, locY;
|
||||
Util.RegionHandleToWorldLoc(tpLocReq.Info.RegionHandle, out locX, out locY);
|
||||
if ((locX >= m_scene.RegionInfo.WorldLocX)
|
||||
&& (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX))
|
||||
&& (locY >= m_scene.RegionInfo.WorldLocY)
|
||||
&& (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)) )
|
||||
{
|
||||
tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||
tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX;
|
||||
tpLocReq.Info.Position.Y += locY - m_scene.RegionInfo.WorldLocY;
|
||||
}
|
||||
|
||||
handlerTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position,
|
||||
tpLocReq.Info.LookAt, 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user