diff options
author | Oz Linden <oz@lindenlab.com> | 2017-04-19 16:27:38 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-04-19 16:27:38 -0400 |
commit | 1b032c37833be3a03170a28b1955c55061936442 (patch) | |
tree | f4500e347b6f18eeafe61217c4a9f884a8ebea34 /indra/newview/llagentcamera.cpp | |
parent | e07a60f6cc80d052377996b8c3ef9a9a20e20584 (diff) | |
parent | f62b5503285d828813d87779fa0658ee5f122ac5 (diff) |
merge changes for 5.0.4-release
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index e335eabd1a..5b9f1b9d4f 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1537,6 +1537,14 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal() } else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) { + if (mFocusOnAvatar) + { + LLVector3 focus_target = isAgentAvatarValid() + ? gAgentAvatarp->mHeadp->getWorldPosition() + : gAgent.getPositionAgent(); + LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target); + mFocusTargetGlobal = focus_target_global; + } return mFocusTargetGlobal; } else if (!mFocusOnAvatar) |