diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-03-26 17:47:12 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-03-26 17:47:12 -0700 |
commit | 8a3fe4d9e4dd5e3092bf55664c0435315690d1f0 (patch) | |
tree | 16987d0ff6cd98f4e761ac3f19f1e37e3cc2c794 /indra | |
parent | d98b2ce4865dc90e635fe75d676e4965bccfa793 (diff) |
Fix for EXT-6573 (Mouse-steering doesn't work in third person view)
LLAgentCamera::cameraOrbitAround() (which had been created from LLAgent:: cameraOrbitAround() when LLAgentCamera was factored out) wasn't correctly processing yaw. Specifically, since gAgent.getFrameAgent() returns by value and not reference, gAgent.getFrameAgent().rotate() was discarding the result of the rotation.
Changed LLAgentCamera::cameraOrbitAround() to use gAgent.yaw() instead, and changed LLAgent::getFrameAgent() to return a const reference instead of a value, which should make the compiler catch errors like this.
Reviewed by Richard in http://codereview.lindenlab.com/1153001
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagent.h | 2 | ||||
-rw-r--r-- | indra/newview/llagentcamera.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 891ce799d2..b59a49be13 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -217,7 +217,7 @@ public: // Coordinate System //-------------------------------------------------------------------- public: - LLCoordFrame getFrameAgent() const { return mFrameAgent; } + const LLCoordFrame& getFrameAgent() const { return mFrameAgent; } void initOriginGlobal(const LLVector3d &origin_global); // Only to be used in ONE place void resetAxes(); void resetAxes(const LLVector3 &look_at); // Makes reasonable left and up diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index e000d44ab8..8eee53363e 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -852,7 +852,7 @@ void LLAgentCamera::cameraOrbitAround(const F32 radians) } else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON || mCameraMode == CAMERA_MODE_FOLLOW)) { - gAgent.getFrameAgent().rotate(radians, gAgent.getReferenceUpVector()); + gAgent.yaw(radians); } else { |