summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-06-15 11:15:51 +0300
committerMike Antipov <mantipov@productengine.com>2010-06-15 11:15:51 +0300
commitd1cb678bac7805f7ceef1d711c7cb49731d6ccb4 (patch)
tree4c282dfa2da46461cff9135a0af93d18cfe43dff /indra/newview/llagentcamera.cpp
parent0ec92fb1c8a90d619d0102d0807a32abedc916f1 (diff)
parentb3fc9c79f559c84893dede3ce643ac0dfd1f3d65 (diff)
Merge from default branch
--HG-- branch : product-engine
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