diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 41fbc2fa33..d30d7fd26d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -44,6 +44,7 @@ #include "llviewertexturelist.h" #include "llgroupmgr.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llwindow.h" #include "llviewerstats.h" @@ -2494,9 +2495,9 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setF32("MapScale", LLWorldMapView::sMapScale ); // Some things are cached in LLAgent. - if (gAgent.mInitialized) + if (gAgent.isInitialized()) { - gSavedSettings.setF32("RenderFarClip", gAgent.mDrawDistance); + gSavedSettings.setF32("RenderFarClip", gAgentCamera.mDrawDistance); } } @@ -3331,10 +3332,10 @@ void LLAppViewer::saveFinalSnapshot() { if (!mSavedFinalSnapshot && !gNoRender) { - gSavedSettings.setVector3d("FocusPosOnLogout", gAgent.calcFocusPositionTargetGlobal()); - gSavedSettings.setVector3d("CameraPosOnLogout", gAgent.calcCameraPositionTargetGlobal()); + gSavedSettings.setVector3d("FocusPosOnLogout", gAgentCamera.calcFocusPositionTargetGlobal()); + gSavedSettings.setVector3d("CameraPosOnLogout", gAgentCamera.calcCameraPositionTargetGlobal()); gViewerWindow->setCursor(UI_CURSOR_WAIT); - gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch + gAgentCamera.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch gSavedSettings.setBOOL("ShowParcelOwners", FALSE); idle(); @@ -3744,7 +3745,7 @@ void LLAppViewer::idle() LLViewerJoystick::getInstance()->moveObjects(); } - gAgent.updateCamera(); + gAgentCamera.updateCamera(); } // update media focus @@ -4078,7 +4079,7 @@ void LLAppViewer::disconnectViewer() LLFloaterInventory::cleanup(); gAgentWearables.cleanup(); - + gAgentCamera.cleanup(); // Also writes cached agent settings to gSavedSettings gAgent.cleanup(); |