File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 56
56
#include " llgroupmgr.h"
57
57
#include " llhudmanager.h"
58
58
#include " lljoystickbutton.h"
59
+ #include " lllandmarkactions.h"
59
60
#include " llmorphview.h"
60
61
#include " llmoveview.h"
61
62
#include " llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
@@ -4317,8 +4318,17 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
4317
4318
4318
4319
void LLAgent::doTeleportViaLandmark (const LLUUID& landmark_asset_id)
4319
4320
{
4320
- LLViewerRegion *regionp = getRegion ();
4321
- if (regionp && teleportCore ())
4321
+ bool is_local (false );
4322
+ LLViewerRegion* regionp = getRegion ();
4323
+
4324
+ if (LLLandmark* landmark = gLandmarkList .getAsset (landmark_asset_id, NULL ))
4325
+ {
4326
+ LLVector3d pos_global;
4327
+ landmark->getGlobalPos (pos_global);
4328
+ is_local = (regionp->getHandle () == to_region_handle_global ((F32)pos_global.mdV [VX], (F32)pos_global.mdV [VY]));
4329
+ }
4330
+
4331
+ if (regionp && teleportCore (is_local))
4322
4332
{
4323
4333
LL_INFOS (" Teleport" ) << " Sending TeleportLandmarkRequest. Current region handle " << regionp->getHandle ()
4324
4334
<< " region id " << regionp->getRegionID ()
You can’t perform that action at this time.
0 commit comments