summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-04-06 16:03:19 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-04-06 16:03:19 +0300
commit1f5bb7be28768fe5341b1ca4b5a5d366f176045e (patch)
treef6a65d00cd55a19d3e5d2d6256ee7d304c696205 /indra
parent2dde3869171105748c1005502481c51eeff59511 (diff)
SL-12904 FIXED Camera Preset does not restore correctly when sitting
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentcamera.cpp6
-rw-r--r--indra/newview/llviewerkeyboard.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 5a5a3efc0f..d1da132587 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1805,7 +1805,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
at_axis.normalize();
gAgent.resetAxes(at_axis * ~parent_rot);
- local_camera_offset = local_camera_offset * gAgent.getFrameAgent().getQuaternion() * parent_rot;
+ local_camera_offset = local_camera_offset * parent_rot;
}
else
{
@@ -1999,9 +1999,7 @@ LLVector3d LLAgentCamera::getCurrentFocusOffset()
LLQuaternion LLAgentCamera::getCurrentAvatarRotation()
{
LLViewerObject* sit_object = (LLViewerObject*)gAgentAvatarp->getParent();
- LLQuaternion av_rot = gAgent.getFrameAgent().getQuaternion();
- LLQuaternion obj_rot = sit_object ? sit_object->getRenderRotation() : LLQuaternion::DEFAULT;
- return av_rot * obj_rot;
+ return sit_object ? sit_object->getRenderRotation() : gAgent.getFrameAgent().getQuaternion();
}
bool LLAgentCamera::isJoystickCameraUsed()
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index e930eb20d3..bccbe61f44 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -345,6 +345,7 @@ void camera_spin_around_ccw_sitting( EKeystate s )
else
{
//change camera but do not send keystrokes
+ gAgentCamera.unlockView();
gAgentCamera.setOrbitLeftKey( get_orbit_rate() );
}
}
@@ -361,6 +362,7 @@ void camera_spin_around_cw_sitting( EKeystate s )
else
{
//change camera but do not send keystrokes
+ gAgentCamera.unlockView();
gAgentCamera.setOrbitRightKey( get_orbit_rate() );
}
}