summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentcamera.cpp4
-rw-r--r--indra/newview/llagentcamera.h2
-rw-r--r--indra/newview/llfloatersavecamerapreset.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index f1d8bf3cf1..5efd614b22 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2656,7 +2656,7 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer
//-----------------------------------------------------------------------------
// setFocusOnAvatar()
//-----------------------------------------------------------------------------
-void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
+void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL reset_axes)
{
if (focus_on_avatar != mFocusOnAvatar)
{
@@ -2673,7 +2673,7 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
//RN: when focused on the avatar, we're not "looking" at it
// looking implies intent while focusing on avatar means
// you're just walking around with a camera on you...eesh.
- if (!mFocusOnAvatar && focus_on_avatar)
+ if (!mFocusOnAvatar && focus_on_avatar && reset_axes)
{
setFocusGlobal(LLVector3d::zero);
mCameraFOVZoomFactor = 0.f;
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index 420cc0b601..841b0e353d 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -217,7 +217,7 @@ public:
void validateFocusObject();
void setFocusGlobal(const LLPickInfo& pick);
void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null);
- void setFocusOnAvatar(BOOL focus, BOOL animate);
+ void setFocusOnAvatar(BOOL focus, BOOL animate, BOOL reset_axes = TRUE);
void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id);
void clearFocusObject();
void setFocusObject(LLViewerObject* object);
diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp
index e2bd2e6d6a..c02f8f0ea1 100644
--- a/indra/newview/llfloatersavecamerapreset.cpp
+++ b/indra/newview/llfloatersavecamerapreset.cpp
@@ -106,6 +106,8 @@ void LLFloaterSaveCameraPreset::onBtnSave()
{
gSavedSettings.setVector3("CameraOffsetRearView", gAgentCamera.getCurrentCameraOffset());
gSavedSettings.setVector3d("FocusOffsetRearView", gAgentCamera.getCurrentFocusOffset());
+ gAgentCamera.resetCameraZoomFraction();
+ gAgentCamera.setFocusOnAvatar(TRUE, TRUE, FALSE);
}
else
{