summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-12-29 01:40:57 +0000
committerJosh Bell <josh@lindenlab.com>2007-12-29 01:40:57 +0000
commitd06e5e3519f13197dd62bfbabf76f7efcc3d7a79 (patch)
tree62b363ba11a3cc7dd78343e63ad440284f0252f3 /indra/newview/llagent.cpp
parent79680891a73be074aa449a9ccdf695b0afd300d8 (diff)
svn merge -r 76642:76643 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-4-merge-76640
Redo of QAR-170, with correct range. Reviewed by CG.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp59
1 files changed, 38 insertions, 21 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a692ef6a3e..f406d61a9e 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -305,7 +305,7 @@ LLAgent::LLAgent()
mbAlwaysRun(FALSE),
mShowAvatar(TRUE),
-
+
mCameraAnimating( FALSE ),
mAnimationCameraStartGlobal(),
mAnimationFocusStartGlobal(),
@@ -410,6 +410,8 @@ LLAgent::LLAgent()
mCameraUpVector = LLVector3::z_axis;// default is straight up
mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
//end ventrella
+
+ mCustomAnim = FALSE ;
}
// Requires gSavedSettings to be initialized.
@@ -2861,8 +2863,14 @@ void LLAgent::endAnimationUpdateUI()
if (mAvatarObject)
{
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+ if(mCustomAnim)
+ {
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP);
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START);
+
+ mCustomAnim = FALSE ;
+ }
+
}
setLookAt(LOOKAT_TARGET_CLEAR);
}
@@ -4188,7 +4196,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate)
//-----------------------------------------------------------------------------
// changeCameraToCustomizeAvatar()
//-----------------------------------------------------------------------------
-void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
+void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate)
{
setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up
gViewerWindow->getWindow()->resetBusyCount();
@@ -4203,16 +4211,16 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
gSavedSettings.setBOOL("ThirdPersonBtnState", FALSE);
gSavedSettings.setBOOL("BuildBtnState", FALSE);
- if (animate)
+ if (camera_animate)
{
startCameraAnimation();
}
// Remove any pitch from the avatar
- LLVector3 at = mFrameAgent.getAtAxis();
- at.mV[VZ] = 0.f;
- at.normVec();
- gAgent.resetAxes(at);
+ //LLVector3 at = mFrameAgent.getAtAxis();
+ //at.mV[VZ] = 0.f;
+ //at.normVec();
+ //gAgent.resetAxes(at);
if( mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR )
{
@@ -4231,22 +4239,31 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
LLVOAvatar::onCustomizeStart();
}
- if (animate && !mAvatarObject.isNull())
+ if (!mAvatarObject.isNull())
{
- sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
- mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
- LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
-
- if (turn_motion)
+ if(avatar_animate)
{
- mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+ // Remove any pitch from the avatar
+ LLVector3 at = mFrameAgent.getAtAxis();
+ at.mV[VZ] = 0.f;
+ at.normVec();
+ gAgent.resetAxes(at);
- }
- else
- {
- mAnimationDuration = gSavedSettings.getF32("ZoomTime");
- }
+ sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
+ mCustomAnim = TRUE ;
+ mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
+ LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
+
+ if (turn_motion)
+ {
+ mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+ }
+ else
+ {
+ mAnimationDuration = gSavedSettings.getF32("ZoomTime");
+ }
+ }