summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index e1e7ee8445..2399e4f495 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -44,6 +44,7 @@
#include "llfirstuse.h"
#include "llhints.h"
#include "lltabcontainer.h"
+#include "llvoavatarself.h"
static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
@@ -566,6 +567,19 @@ void LLFloaterCamera::switchToPreset(const std::string& name)
LLPresetsManager::getInstance()->loadPreset(PRESETS_CAMERA, name);
}
+ if (isAgentAvatarValid() && gAgentAvatarp->getParent())
+ {
+ LLQuaternion sit_rot = gSavedSettings.getQuaternion("AvatarSitRotation");
+ if (sit_rot != LLQuaternion())
+ {
+ gAgent.rotate(~gAgent.getFrameAgent().getQuaternion());
+ gAgent.rotate(sit_rot);
+ }
+ else
+ {
+ gAgentCamera.rotateToInitSitRot();
+ }
+ }
gAgentCamera.resetCameraZoomFraction();
LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance();