summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-14 10:53:28 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-14 10:53:28 -0700
commit76cf9e29a77566c10da6184833fad6b0912e9688 (patch)
tree47ad7d6efd735ba8d6c422b1cbf1c3dde56901c7 /indra/newview/llagentcamera.cpp
parent41bee5cfe8bd0b83fdc93cd1541f3fc82ecb6aab (diff)
EXT-7799 My Appearance - Edit outfit positions camera to previous camera coordinates
reviewed by richard
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index c3f075fd49..977f1c9fa8 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2312,12 +2312,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
startCameraAnimation();
}
- // Remove any pitch from the avatar
- //LLVector3 at = gAgent.getFrameAgent().getAtAxis();
- //at.mV[VZ] = 0.f;
- //at.normalize();
- //gAgent.resetAxes(at);
-
if (mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR)
{
updateLastCamera();
@@ -2338,9 +2332,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
if (isAgentAvatarValid())
{
if(avatar_animate)
- {
- // Remove any pitch from the avatar
- LLVector3 at = gAgent.getFrameAgent().getAtAxis();
+ {
+ // slamming the avatar's axis to the camera so that when the rotation
+ // completes it correctly points to the front of the avatar
+ // Remove any pitch or rotation from the avatar
+ LLVector3 at = LLViewerCamera::getInstance()->getAtAxis();
at.mV[VZ] = 0.f;
at.normalize();
gAgent.resetAxes(at);
@@ -2360,6 +2356,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
mAnimationDuration = gSavedSettings.getF32("ZoomTime");
}
}
+
+ // this is what sets the avatar as the mFocusTargetGlobal
+ setFocusGlobal(LLVector3d::zero);
+
gAgentAvatarp->updateMeshTextures();
}
else