summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-06-21 13:26:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-06-21 13:26:15 -0400
commite766d9e697eae29b3f82106603843efbeb7aa01b (patch)
tree872a0ab94d81699ec3ea1f7113c9c56e2a2486d3 /indra/newview/llagent.cpp
parentd26c931ae2c5d33adc5fc20842b7be838a2822b4 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
DRTVWR-447: Merge up to latest viewer-release
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2243cbdf5a..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