From 56dbd313a156a6913d791c920d0023f5451c657f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 1 Apr 2010 17:23:49 +0100 Subject: Checker: CHECKED_RETURN Function: LLAgentCamera::updateCamera() File: /indra/newview/llagentcamera.cpp not a bug, but I cleaned up BOOL->bool --- indra/newview/llagentcamera.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llagentcamera.cpp') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index bb06255fd1..e8ffe9708b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -142,7 +142,7 @@ LLAgentCamera::LLAgentCamera() : mSitCameraEnabled(FALSE), mCameraSmoothingLastPositionGlobal(), mCameraSmoothingLastPositionAgent(), - mCameraSmoothingStop(FALSE), + mCameraSmoothingStop(false), mCameraUpVector(LLVector3::z_axis), // default is straight up @@ -1042,7 +1042,7 @@ void LLAgentCamera::cameraPanLeft(F32 meters) mFocusGlobal = mFocusTargetGlobal; // disable smoothing for camera pan, which causes some residents unhappiness - mCameraSmoothingStop = TRUE; + mCameraSmoothingStop = true; cameraZoomIn(1.f); updateFocusOffset(); @@ -1062,7 +1062,7 @@ void LLAgentCamera::cameraPanUp(F32 meters) mFocusGlobal = mFocusTargetGlobal; // disable smoothing for camera pan, which causes some residents unhappiness - mCameraSmoothingStop = TRUE; + mCameraSmoothingStop = true; cameraZoomIn(1.f); updateFocusOffset(); @@ -1364,7 +1364,8 @@ void LLAgentCamera::updateCamera() LLVector3d camera_pos_agent = camera_pos_global - agent_pos; // Sitting on what you're manipulating can cause camera jitter with smoothing. // This turns off smoothing while editing. -MG - mCameraSmoothingStop |= (BOOL)LLToolMgr::getInstance()->inBuildMode(); + bool in_build_mode = LLToolMgr::getInstance()->inBuildMode(); + mCameraSmoothingStop = mCameraSmoothingStop || in_build_mode; if (cameraThirdPerson() && !mCameraSmoothingStop) { @@ -1396,7 +1397,7 @@ void LLAgentCamera::updateCamera() mCameraSmoothingLastPositionGlobal = camera_pos_global; mCameraSmoothingLastPositionAgent = camera_pos_agent; - mCameraSmoothingStop = FALSE; + mCameraSmoothingStop = false; } -- cgit v1.2.3 From fb08c17cdda47051fcfffc9cc8ff590e34c6ef94 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 1 Apr 2010 17:25:42 +0100 Subject: Checker: UNINIT_CTOR Function: LLAgentCamera::LLAgentCamera() File: /indra/newview/llagentcamera.cpp --- indra/newview/llagentcamera.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentcamera.cpp') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index e8ffe9708b..908bcfab6a 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -107,6 +107,8 @@ LLAgentCamera gAgentCamera; // LLAgentCamera() //----------------------------------------------------------------------------- LLAgentCamera::LLAgentCamera() : + mInitialized(false), + mDrawDistance( DEFAULT_FAR_PLANE ), mLookAt(NULL), @@ -219,7 +221,7 @@ void LLAgentCamera::init() mCameraZoomFraction = 1.f; mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject"); - mInitialized = TRUE; + mInitialized = true; } //----------------------------------------------------------------------------- -- cgit v1.2.3 From 656a533fac6c039ae7b38a6d33f7a28bc763d053 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 12:41:41 -0700 Subject: EXT-6431 - Avatar head doesn't correctly follow mouse when side panel is open --- indra/newview/llagentcamera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagentcamera.cpp') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index bb06255fd1..66f9e1117b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1122,9 +1122,9 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) { // range from -.5 to .5 F32 x_from_center = - ((F32) mouse_x / (F32) gViewerWindow->getWindowWidthScaled() ) - 0.5f; + ((F32) mouse_x / (F32) gViewerWindow->getWorldViewWidthScaled() ) - 0.5f; F32 y_from_center = - ((F32) mouse_y / (F32) gViewerWindow->getWindowHeightScaled() ) - 0.5f; + ((F32) mouse_y / (F32) gViewerWindow->getWorldViewHeightScaled() ) - 0.5f; frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); -- cgit v1.2.3