summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2020-01-30 17:51:41 +0200
committermaxim_productengine <mnikolenko@productengine.com>2020-01-30 17:51:41 +0200
commit2c7a8a2485b98ff56e6fdc431bba5ccd226ae740 (patch)
tree839b7dd57c46a40c0d21ab0a8dee20f4c3d6c545 /indra/newview/llagentcamera.cpp
parente865c94513ea22f06ceab4c3698cb180fb30707a (diff)
SL-12618 FIXED The camera zoom position is incorrect after selecting the preset in some cases
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index d4d4f8e124..6b1dd4c3c3 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -717,7 +717,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance)
return TRUE;
}
-F32 LLAgentCamera::getCameraZoomFraction()
+F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person)
{
// 0.f -> camera zoomed all the way out
// 1.f -> camera zoomed all the way in
@@ -727,7 +727,7 @@ F32 LLAgentCamera::getCameraZoomFraction()
// already [0,1]
return mHUDTargetZoom;
}
- else if (mFocusOnAvatar && cameraThirdPerson())
+ else if (get_third_person || (mFocusOnAvatar && cameraThirdPerson()))
{
return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f);
}