summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersavecamerapreset.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-04-20 14:27:22 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-04-20 14:27:22 +0300
commit74d6e6b65c9c3e85e8ec84939b35a1e584379e1f (patch)
tree594978c1282ff02e37525b6f94f310d4299a1583 /indra/newview/llfloatersavecamerapreset.cpp
parent70d340a1bff2707138ac41fdd1408a5b2e46fc71 (diff)
SL-12904 FIXED Camera Preset does not restore correctly when sitting
Diffstat (limited to 'indra/newview/llfloatersavecamerapreset.cpp')
-rw-r--r--indra/newview/llfloatersavecamerapreset.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp
index c02f8f0ea1..5704a7a525 100644
--- a/indra/newview/llfloatersavecamerapreset.cpp
+++ b/indra/newview/llfloatersavecamerapreset.cpp
@@ -28,6 +28,7 @@
#include "llfloatersavecamerapreset.h"
+#include "llagent.h"
#include "llagentcamera.h"
#include "llbutton.h"
#include "llcombobox.h"
@@ -38,6 +39,7 @@
#include "llpresetsmanager.h"
#include "llradiogroup.h"
#include "lltrans.h"
+#include "llvoavatarself.h"
LLFloaterSaveCameraPreset::LLFloaterSaveCameraPreset(const LLSD &key)
: LLModalDialog(key)
@@ -102,6 +104,10 @@ void LLFloaterSaveCameraPreset::onBtnSave()
}
else
{
+ if (isAgentAvatarValid() && gAgentAvatarp->getParent())
+ {
+ gSavedSettings.setQuaternion("AvatarSitRotation", gAgent.getFrameAgent().getQuaternion());
+ }
if (gAgentCamera.isJoystickCameraUsed())
{
gSavedSettings.setVector3("CameraOffsetRearView", gAgentCamera.getCurrentCameraOffset());