summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-04-10 18:38:56 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-04-10 18:38:56 +0300
commit944b908be10367ae5770db03bddddd40cd4d18d8 (patch)
tree05217fe9a14ba18a1299de412ac9718b7689de61 /indra/newview/llagentcamera.cpp
parent1ec8c7a68adb10c78e1cc31182b797d6a2ae386f (diff)
SL-12994 FIXED [Camera Presets] Zoom fraction should be saved as a part of Camera preset, not as separate setting
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index d1da132587..f1d8bf3cf1 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1987,8 +1987,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
LLVector3 LLAgentCamera::getCurrentCameraOffset()
{
- LLVector3 camera_offset = (LLViewerCamera::getInstance()->getOrigin() - getAvatarRootPosition() - mThirdPersonHeadOffset) * ~getCurrentAvatarRotation();
- return camera_offset / mCameraZoomFraction / gSavedSettings.getF32("CameraOffsetScale");
+ return (LLViewerCamera::getInstance()->getOrigin() - getAvatarRootPosition() - mThirdPersonHeadOffset) * ~getCurrentAvatarRotation();
}
LLVector3d LLAgentCamera::getCurrentFocusOffset()
@@ -2829,6 +2828,11 @@ BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object,
return mPointAt->setPointAt(target_type, object, position);
}
+void LLAgentCamera::resetCameraZoomFraction()
+{
+ mCameraZoomFraction = INITIAL_ZOOM_FRACTION;
+}
+
ELookAtType LLAgentCamera::getLookAtType()
{
if (mLookAt)