diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-05-17 15:05:18 +0000 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2018-05-17 15:05:18 +0000 |
commit | 398a5d4ddb50fae54b8227cc968dd99da53930f3 (patch) | |
tree | c2f8cb28dde3d7e42f965dc5d1f241f825a3f6f9 | |
parent | 7a2e3dd1bc11852fcddb185dd6da25460d4942c8 (diff) |
MAINT-8479 When facing object we should ignore movement distance threshold
-rw-r--r-- | indra/newview/lltoolselect.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 0ff05479f1..c22eb48eef 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -52,6 +52,7 @@ //extern BOOL gAllowSelectAvatar; const F32 SELECTION_ROTATION_TRESHOLD = 0.1f; +const F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian LLToolSelect::LLToolSelect( LLToolComposite* composite ) : LLTool( std::string("Select"), composite ), @@ -194,7 +195,13 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi { LLQuaternion target_rot; target_rot.shortestArc(LLVector3::x_axis, selection_dir); - gAgent.startAutoPilotGlobal(gAgent.getPositionGlobal(), "", &target_rot, NULL, NULL, llmax(1.f, gAgentAvatarp->getPelvisToFoot()), SELECTION_ROTATION_TRESHOLD); + gAgent.startAutoPilotGlobal(gAgent.getPositionGlobal(), + "", + &target_rot, + NULL, + NULL, + MAX_FAR_CLIP /*stop_distance, don't care since we are looking, not moving*/, + gAgentAvatarp->isSitting() ? SELECTION_SITTING_ROTATION_TRESHOLD : SELECTION_ROTATION_TRESHOLD); } } |