LLAgentCamera transition (1/2)

This commit is contained in:
Shyotl
2011-06-07 21:35:10 -05:00
parent 278cfbdb67
commit a07e399801
89 changed files with 616 additions and 572 deletions

View File

@@ -86,6 +86,7 @@
#include "v3math.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llagentpilot.h"
#include "llfloateravatarlist.h"
#include "llfloateravatarpicker.h"
@@ -1698,7 +1699,7 @@ bool idle_startup()
it = options[0].find("folder_id");
if(it != options[0].end())
{
gAgent.mInventoryRootID.set((*it).second);
gAgent.setInventoryRootID(LLUUID((*it).second));
//gInventory.mock(gAgent.getInventoryRootID());
}
}
@@ -1905,6 +1906,7 @@ bool idle_startup()
// Finish agent initialization. (Requires gSavedSettings, builds camera)
gAgent.init();
gAgentCamera.init();
set_underclothes_menu_options();
// Since we connected, save off the settings so the user doesn't have to
@@ -1936,7 +1938,7 @@ bool idle_startup()
// World initialization must be done after above window init
// User might have overridden far clip
LLWorld::getInstance()->setLandFarClip( gAgent.mDrawDistance );
LLWorld::getInstance()->setLandFarClip( gAgentCamera.mDrawDistance );
// Before we create the first region, we need to set the agent's mOriginGlobal
// This is necessary because creating objects before this is set will result in a
@@ -2147,8 +2149,8 @@ bool idle_startup()
gAgent.setPositionAgent(agent_start_position_region);
gAgent.resetAxes(agent_start_look_at);
gAgent.stopCameraAnimation();
gAgent.resetCamera();
gAgentCamera.stopCameraAnimation();
gAgentCamera.resetCamera();
// Initialize global class data needed for surfaces (i.e. textures)
if (!gNoRender)
@@ -2715,15 +2717,15 @@ bool idle_startup()
if (samename)
{
// restore old camera pos
gAgent.setFocusOnAvatar(FALSE, FALSE);
gAgent.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null);
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
gAgentCamera.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null);
BOOL limit_hit = FALSE;
gAgent.calcCameraPositionTargetGlobal(&limit_hit);
gAgentCamera.calcCameraPositionTargetGlobal(&limit_hit);
if (limit_hit)
{
gAgent.setFocusOnAvatar(TRUE, FALSE);
gAgentCamera.setFocusOnAvatar(TRUE, FALSE);
}
gAgent.stopCameraAnimation();
gAgentCamera.stopCameraAnimation();
}
}
}