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