diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2018-06-26 09:12:08 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2018-06-26 09:12:08 -0400 |
commit | 3a7513b5875b86c247dd49fe78b8fab955ba5e0a (patch) | |
tree | 3f942d50b41fd090550541af01bb50d23d845c09 /indra/newview/llagent.cpp | |
parent | 06954294b8739dd51abe75e3710da6e496b353d4 (diff) | |
parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) |
DRTVWR-453: Merge up to latest viewer-release.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f67bb22f5b..901294d6b4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1580,6 +1580,8 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) LLViewerObject *obj; LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); + // Note: this might malfunction for sitting agent, since pelvis stays same, but agent's position becomes lower + // But for autopilot to work we assume that agent is standing and ready to go. F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); // clamp z value of target to minimum height above ground @@ -3943,8 +3945,7 @@ void LLAgent::teleportRequest( bool look_at_from_camera) { LLViewerRegion* regionp = getRegion(); - bool is_local = (region_handle == regionp->getHandle()); - if(regionp && teleportCore(is_local)) + if (regionp && teleportCore(region_handle == regionp->getHandle())) { LL_INFOS("") << "TeleportLocationRequest: '" << region_handle << "':" << pos_local << LL_ENDL; |