diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 14:00:50 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 14:00:50 -0700 |
commit | 36fd0f7ca932cce5cd3614c16cd26aceedf57952 (patch) | |
tree | ada1b461d97bf75b016a13bbc30c070ee74a1183 /indra/newview/llagentcamera.cpp | |
parent | 78e3edba6e998d8e97a1bff952073f62e58fd379 (diff) | |
parent | 069304ca394d4d6069f00bb976f2d75e82bf675c (diff) |
Merge branch 'DRTVWR-559' of bitbucket.org:lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 8d02bec53e..57a59d81c4 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -401,10 +401,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi LLQuaternion obj_rot = object->getRenderRotation(); LLVector3 obj_pos = object->getRenderPosition(); - BOOL is_avatar = object->isAvatar(); // if is avatar - don't do any funk heuristics to position the focal point // see DEV-30589 - if (is_avatar) + if (object->isAvatar() || (object->isAnimatedObject() && object->getControlAvatar())) { return original_focus_point - obj_pos; } @@ -529,7 +528,6 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi // or keep the focus point in the object middle when (relatively) far // NOTE: leave focus point in middle of avatars, since the behavior you want when alt-zooming on avatars // is almost always "tumble about middle" and not "spin around surface point" - if (!is_avatar) { LLVector3 obj_rel = original_focus_point - object->getRenderPosition(); @@ -1423,7 +1421,7 @@ void LLAgentCamera::updateCamera() F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE); - if (!mFocusObject) // we differentiate on avatar mode + if (mFocusOnAvatar && !mFocusObject) // we differentiate on avatar mode { // for avatar-relative focus, we smooth in avatar space - // the avatar moves too jerkily w/r/t global space to smooth there. |