diff options
-rw-r--r-- | indra/newview/app_settings/camera/Front.xml | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/camera/Rear.xml | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/camera/Side.xml | 2 | ||||
-rw-r--r-- | indra/newview/llagentcamera.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llagentcamera.h | 8 | ||||
-rw-r--r-- | indra/newview/llpresetsmanager.cpp | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/app_settings/camera/Front.xml b/indra/newview/app_settings/camera/Front.xml index e4839d48ec..7b5d597fdf 100644 --- a/indra/newview/app_settings/camera/Front.xml +++ b/indra/newview/app_settings/camera/Front.xml @@ -72,7 +72,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.9</real> + <real>0.90322577953338623</real> </map> <key>EditCameraMovement</key> <map> diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml index 72e6c5d93a..7aa36c3e59 100644 --- a/indra/newview/app_settings/camera/Rear.xml +++ b/indra/newview/app_settings/camera/Rear.xml @@ -72,7 +72,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.9</real> + <real>0.90322577953338623</real> </map> <key>EditCameraMovement</key> <map> diff --git a/indra/newview/app_settings/camera/Side.xml b/indra/newview/app_settings/camera/Side.xml index eb3b3253c1..8890d9cbce 100644 --- a/indra/newview/app_settings/camera/Side.xml +++ b/indra/newview/app_settings/camera/Side.xml @@ -72,7 +72,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.9</real> + <real>0.90322577953338623</real> </map> <key>EditCameraMovement</key> <map> diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index d4d4f8e124..6b1dd4c3c3 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -717,7 +717,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) return TRUE; } -F32 LLAgentCamera::getCameraZoomFraction() +F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person) { // 0.f -> camera zoomed all the way out // 1.f -> camera zoomed all the way in @@ -727,7 +727,7 @@ F32 LLAgentCamera::getCameraZoomFraction() // already [0,1] return mHUDTargetZoom; } - else if (mFocusOnAvatar && cameraThirdPerson()) + else if (get_third_person || (mFocusOnAvatar && cameraThirdPerson())) { return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f); } diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index af65ab431a..128974666e 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -272,10 +272,10 @@ public: // Zoom //-------------------------------------------------------------------- public: - void handleScrollWheel(S32 clicks); // Mousewheel driven zoom - void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance - F32 getCameraZoomFraction(); // Get camera zoom as fraction of minimum and maximum zoom - void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom + void handleScrollWheel(S32 clicks); // Mousewheel driven zoom + void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance + F32 getCameraZoomFraction(bool get_third_person = false); // Get camera zoom as fraction of minimum and maximum zoom + void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom F32 calcCameraFOVZoomFactor(); F32 getAgentHUDTargetZoom(); diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 6b83be2b70..eaf139b106 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -288,7 +288,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n getControlNames(name_list); name_list.push_back("PresetCameraActive"); - gSavedSettings.setF32("CameraZoomFraction", gAgentCamera.getCameraZoomFraction()); + gSavedSettings.setF32("CameraZoomFraction", gAgentCamera.getCameraZoomFraction(true)); name_list.push_back("CameraZoomFraction"); } else |