From 4dd6b6b2bea93cd37d908f597482a42e80d3e8bb Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 13 Apr 2021 13:12:44 -0700 Subject: SL-14885 Allow mousewheel to zoom way out when user has disabled camera constraints --- indra/newview/llagentcamera.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index ed6c3c307f..86d2b0fc6c 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2038,6 +2038,12 @@ LLVector3d LLAgentCamera::getFocusOffsetInitial() F32 LLAgentCamera::getCameraMaxZoomDistance() { + // SL-14706 / SL-14885 TPV have relaxed camera constraints allowing you to mousewheeel zoom WAY out. + if (gSavedSettings.getBOOL("DisableCameraConstraints")) + { + return (F32)INT_MAX; + } + // Ignore "DisableCameraConstraints", we don't want to be out of draw range when we focus onto objects or avatars return llmin(MAX_CAMERA_DISTANCE_FROM_OBJECT, mDrawDistance - 1, // convenience, don't hit draw limit when focusing on something -- cgit v1.2.3 From d1875c4932ea83decf871a7fccf871fcfe4d01ea Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 13 Apr 2021 13:12:44 -0700 Subject: SL-14885 Allow mousewheel to zoom way out when user has disabled camera constraints --- indra/newview/llagentcamera.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index ed6c3c307f..86d2b0fc6c 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2038,6 +2038,12 @@ LLVector3d LLAgentCamera::getFocusOffsetInitial() F32 LLAgentCamera::getCameraMaxZoomDistance() { + // SL-14706 / SL-14885 TPV have relaxed camera constraints allowing you to mousewheeel zoom WAY out. + if (gSavedSettings.getBOOL("DisableCameraConstraints")) + { + return (F32)INT_MAX; + } + // Ignore "DisableCameraConstraints", we don't want to be out of draw range when we focus onto objects or avatars return llmin(MAX_CAMERA_DISTANCE_FROM_OBJECT, mDrawDistance - 1, // convenience, don't hit draw limit when focusing on something -- cgit v1.2.3 From 176e56d3e8ddc7f937b2b67c005d7a210e2526a1 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 30 Apr 2021 10:56:08 -0700 Subject: SL-14885: Use LLCachedControl --- indra/newview/llagentcamera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 86d2b0fc6c..0cf91ba3de 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2039,7 +2039,8 @@ LLVector3d LLAgentCamera::getFocusOffsetInitial() F32 LLAgentCamera::getCameraMaxZoomDistance() { // SL-14706 / SL-14885 TPV have relaxed camera constraints allowing you to mousewheeel zoom WAY out. - if (gSavedSettings.getBOOL("DisableCameraConstraints")) + static LLCachedControl s_disable_camera_constraints(gSavedSettings, "DisableCameraConstraints", false); + if (s_disable_camera_constraints) { return (F32)INT_MAX; } -- cgit v1.2.3