diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
commit | 3e10fa4d51a23bf6f1ced23e8d90c636d84fa5db (patch) | |
tree | d4991e4c1a9dd934f48d33804e55eb8ffa085679 /indra/newview/llagent.cpp | |
parent | e9f7205ba9f4dfb3422759218609b62d61972722 (diff) | |
parent | f20e9521a9b70f4e83cbb6888feae08a70681ea7 (diff) |
merge from latest svn/viewer-2-0 to hg/viewer-2-0
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ab9db303b5..a4b33162d6 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -332,7 +332,7 @@ LLAgent::LLAgent() : mLeftKey(0), mUpKey(0), mYawKey(0.f), - mPitchKey(0), + mPitchKey(0.f), mOrbitLeftKey(0.f), mOrbitRightKey(0.f), @@ -727,15 +727,15 @@ void LLAgent::moveYaw(F32 mag, bool reset_view) //----------------------------------------------------------------------------- // movePitch() //----------------------------------------------------------------------------- -void LLAgent::movePitch(S32 direction) +void LLAgent::movePitch(F32 mag) { - setKey(direction, mPitchKey); + mPitchKey = mag; - if (direction > 0) + if (mag > 0) { - setControlFlags(AGENT_CONTROL_PITCH_POS ); + setControlFlags(AGENT_CONTROL_PITCH_POS); } - else if (direction < 0) + else if (mag < 0) { setControlFlags(AGENT_CONTROL_PITCH_NEG); } @@ -2513,10 +2513,10 @@ void LLAgent::propagate(const F32 dt) // handle rotation based on keyboard levels const F32 YAW_RATE = 90.f * DEG_TO_RAD; // radians per second - yaw( YAW_RATE * mYawKey * dt ); + yaw(YAW_RATE * mYawKey * dt); const F32 PITCH_RATE = 90.f * DEG_TO_RAD; // radians per second - pitch(PITCH_RATE * (F32) mPitchKey * dt); + pitch(PITCH_RATE * mPitchKey * dt); // handle auto-land behavior if (mAvatarObject.notNull()) @@ -2541,7 +2541,7 @@ void LLAgent::propagate(const F32 dt) mLeftKey = 0; mUpKey = 0; mYawKey = 0.f; - mPitchKey = 0; + mPitchKey = 0.f; } //----------------------------------------------------------------------------- @@ -3172,6 +3172,7 @@ void LLAgent::updateCamera() mFollowCam.copyParams(*current_cam); mFollowCam.setSubjectPositionAndRotation( mAvatarObject->getRenderPosition(), avatarRotationForFollowCam ); mFollowCam.update(); + LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); } else { @@ -4249,7 +4250,7 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_ani { if(avatar_animate) { - // Remove any pitch from the avatar + // Remove any pitch from the avatar LLVector3 at = mFrameAgent.getAtAxis(); at.mV[VZ] = 0.f; at.normalize(); |