From 4f2cd0da24a095aed52941fa0a0e76a41b636f2e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 4 Feb 2017 01:10:02 +0100 Subject: [PATCH] FIRE-20833: Disabling mouse wheel zoom also disables scaling HUDs in build mode --- indra/newview/llagentcamera.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 0bf2d502fb..0dcb83bce6 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2105,17 +2105,18 @@ LLVector3 LLAgentCamera::getCameraOffsetInitial() //----------------------------------------------------------------------------- void LLAgentCamera::handleScrollWheel(S32 clicks) { - // Option to disable mouse wheel for camera zooming in/out static LLCachedControl FSDisableMouseWheelCameraZoom(gSavedSettings, "FSDisableMouseWheelCameraZoom"); - if(FSDisableMouseWheelCameraZoom) - { - return; - } - // if (mCameraMode == CAMERA_MODE_FOLLOW && getFocusOnAvatar()) { + // Option to disable mouse wheel for camera zooming in/out + if (FSDisableMouseWheelCameraZoom) + { + return; + } + // + if (!mFollowCam.getPositionLocked()) // not if the followCam position is locked in place { mFollowCam.zoom(clicks); @@ -2141,6 +2142,12 @@ void LLAgentCamera::handleScrollWheel(S32 clicks) F32 zoom_factor = (F32)pow(0.8, -clicks); cameraZoomIn(zoom_factor); } + // Option to disable mouse wheel for camera zooming in/out + else if (FSDisableMouseWheelCameraZoom) + { + return; + } + // else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON)) { // Camera focus and offset with CTRL/SHIFT + Scroll wheel