LLAgentCamera transition (1/2)
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llgroupmgr.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llmd5.h"
|
||||
@@ -440,7 +441,7 @@ static void settings_to_globals()
|
||||
gFrameStats.setTrackStats(gSavedSettings.getBOOL("StatsSessionTrackFrameStats"));
|
||||
gAgentPilot.mNumRuns = gSavedSettings.getS32("StatsNumRuns");
|
||||
gAgentPilot.mQuitAfterRuns = gSavedSettings.getBOOL("StatsQuitAfterRuns");
|
||||
gAgent.mHideGroupTitle = gSavedSettings.getBOOL("RenderHideGroupTitle");
|
||||
gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle"));
|
||||
|
||||
gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc");
|
||||
gAllowIdleAFK = gSavedSettings.getBOOL("AllowIdleAFK");
|
||||
@@ -2454,9 +2455,9 @@ void LLAppViewer::cleanupSavedSettings()
|
||||
gSavedSettings.setBOOL("ShowHoverTips", LLHoverView::sShowHoverTips);
|
||||
|
||||
// Some things are cached in LLAgent.
|
||||
if (gAgent.mInitialized)
|
||||
if (gAgentCamera.isInitialized())
|
||||
{
|
||||
gSavedSettings.setF32("RenderFarClip", gAgent.mDrawDistance);
|
||||
gSavedSettings.setF32("RenderFarClip", gAgentCamera.mDrawDistance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3325,10 +3326,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();
|
||||
|
||||
@@ -3769,7 +3770,7 @@ void LLAppViewer::idle()
|
||||
LLViewerJoystick::getInstance()->moveObjects();
|
||||
}
|
||||
|
||||
gAgent.updateCamera();
|
||||
gAgentCamera.updateCamera();
|
||||
}
|
||||
|
||||
// update media focus
|
||||
@@ -4172,6 +4173,7 @@ void LLAppViewer::disconnectViewer()
|
||||
// close inventory interface, close all windows
|
||||
LLInventoryView::cleanup();
|
||||
|
||||
gAgentCamera.cleanup();
|
||||
// Also writes cached agent settings to gSavedSettings
|
||||
gAgent.cleanup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user