diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-03-11 22:44:49 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-03-11 22:44:49 -0400 |
| commit | e0d14e02e152b4e75ff8bdd974677f9669163d68 (patch) | |
| tree | 3379d14c9c5d8c188d2fb716e61edd09fc1219a9 /indra/newview/llagent.cpp | |
| parent | 179b29252d8bb28e11686a1852c8e8ffcd98ecc0 (diff) | |
| parent | b50ad90febda24d2296541f46ea1a129232aad70 (diff) | |
Merge branch 'release/2025.03' into rye/forevermac
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8756baa04a..2161dbe19e 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -56,6 +56,7 @@ #include "llgroupmgr.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "lllandmarkactions.h" #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state @@ -2501,7 +2502,10 @@ void LLAgent::endAnimationUpdateUI() gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); } - gFloaterTools->dirty(); + if (gFloaterTools) + { + gFloaterTools->dirty(); + } // Don't let this be called more than once if the camera // mode hasn't changed. --JC @@ -4317,8 +4321,22 @@ void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id) void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id) { - LLViewerRegion *regionp = getRegion(); - if(regionp && teleportCore()) + LLViewerRegion* regionp = getRegion(); + if (!regionp) + { + LL_WARNS("Teleport") << "called when agent region is null" << LL_ENDL; + return; + } + + bool is_local(false); + if (LLLandmark* landmark = gLandmarkList.getAsset(landmark_asset_id, NULL)) + { + LLVector3d pos_global; + landmark->getGlobalPos(pos_global); + is_local = (regionp->getHandle() == to_region_handle_global((F32)pos_global.mdV[VX], (F32)pos_global.mdV[VY])); + } + + if(regionp && teleportCore(is_local)) { LL_INFOS("Teleport") << "Sending TeleportLandmarkRequest. Current region handle " << regionp->getHandle() << " region id " << regionp->getRegionID() |
