diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-03-29 03:15:21 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-03-29 03:15:21 +0300 |
commit | d9effe167d19101099cbb8be263fdbfdea93e70e (patch) | |
tree | 47198ea02cf26cfc249977c9af0845a39c9f20ad /indra/newview/llagentcamera.cpp | |
parent | 084f7cf44a3259242d28264f0bb191004282dd9c (diff) | |
parent | 45dd355d46dc8ea5a0a6934722ffc76f9d955a9f (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 7723dbf978..5b9f1b9d4f 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1537,11 +1537,14 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal() } else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) { - LLVector3 focus_target = isAgentAvatarValid() - ? gAgentAvatarp->mHeadp->getWorldPosition() - : gAgent.getPositionAgent(); - LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target); - mFocusTargetGlobal = focus_target_global; + 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) |