summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2020-04-02 15:32:04 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2020-04-02 15:32:04 +0300
commit2dde3869171105748c1005502481c51eeff59511 (patch)
tree5cd0559e6e238b56f9e243970e2141caa7540ff7 /indra/newview
parentaefd01bd9cd3f8bf88231b15462abc1ccd79a7b9 (diff)
SL-12927 FIXED [Camera Presets] when sitting pressing ESC key causes rotation
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentcamera.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index bac31d48a1..5a5a3efc0f 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2312,15 +2312,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate)
}
// Remove any pitch from the avatar
- if (isAgentAvatarValid() && gAgentAvatarp->getParent())
- {
- LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
- at_axis = LLViewerCamera::getInstance()->getAtAxis();
- at_axis.mV[VZ] = 0.f;
- at_axis.normalize();
- gAgent.resetAxes(at_axis * ~obj_rot);
- }
- else
+ if (!isAgentAvatarValid() || !gAgentAvatarp->getParent())
{
at_axis = gAgent.getFrameAgent().getAtAxis();
at_axis.mV[VZ] = 0.f;
@@ -2691,15 +2683,7 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
if (mCameraMode == CAMERA_MODE_THIRD_PERSON)
{
LLVector3 at_axis;
- if (isAgentAvatarValid() && gAgentAvatarp->getParent())
- {
- LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation();
- at_axis = LLViewerCamera::getInstance()->getAtAxis();
- at_axis.mV[VZ] = 0.f;
- at_axis.normalize();
- gAgent.resetAxes(at_axis * ~obj_rot);
- }
- else
+ if (!isAgentAvatarValid() || !gAgentAvatarp->getParent())
{
at_axis = LLViewerCamera::getInstance()->getAtAxis();
at_axis.mV[VZ] = 0.f;