diff options
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 5b9f1b9d4f..bc92b5e1d9 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1946,6 +1946,13 @@ LLVector3 LLAgentCamera::getCameraOffsetInitial() return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, ""); } +F32 LLAgentCamera::getCameraMaxZoomDistance() +{ + // 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 + LLWorld::getInstance()->getRegionWidthInMeters() - CAMERA_FUDGE_FROM_OBJECT); +} //----------------------------------------------------------------------------- // handleScrollWheel() |