SL-14885 Allow mousewheel to zoom way out when user has disabled camera constraints

master
Ptolemy 2021-04-13 13:12:44 -07:00
parent 54d4406df7
commit d1875c4932
1 changed files with 6 additions and 0 deletions

View File

@ -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