diff options
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rw-r--r-- | indra/newview/lltoolmgr.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index fd12163fd3..a8696c22ef 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -56,6 +56,7 @@ #include "lltoolobjpicker.h" #include "lltoolpipette.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llviewerjoystick.h" #include "llviewermenu.h" @@ -262,7 +263,7 @@ void LLToolMgr::toggleBuildMode() else { // manually disable edit mode, but do not affect the camera - gAgent.resetView(false); + gAgentCamera.resetView(false); LLFloaterReg::hideInstance("build"); gViewerWindow->showCursor(); } @@ -271,7 +272,7 @@ void LLToolMgr::toggleBuildMode() } else { - ECameraMode camMode = gAgent.getCameraMode(); + ECameraMode camMode = gAgentCamera.getCameraMode(); if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode) { // pull the user out of mouselook or appearance mode when entering build mode @@ -286,13 +287,13 @@ void LLToolMgr::toggleBuildMode() handle_toggle_flycam(); } - if (gAgent.getFocusOnAvatar()) + if (gAgentCamera.getFocusOnAvatar()) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); } } @@ -303,7 +304,7 @@ void LLToolMgr::toggleBuildMode() // Could be first use //LLFirstUse::useBuild(); - gAgent.resetView(false); + gAgentCamera.resetView(false); // avoid spurious avatar movements LLViewerJoystick::getInstance()->setNeedsReset(); @@ -317,7 +318,7 @@ bool LLToolMgr::inBuildMode() // cameraMouselook() actually starts returning true. Also, appearance edit // sets build mode to true, so let's exclude that. bool b=(inEdit() - && !gAgent.cameraMouselook() + && !gAgentCamera.cameraMouselook() && mCurrentToolset != gFaceEditToolset); return b; |