diff options
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d4d6a74f0c..b5a73a3143 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -62,6 +62,7 @@ #include "llimfloater.h" #include "lllocationhistory.h" #include "llimageworker.h" + #include "llloginflags.h" #include "llmd5.h" #include "llmemorystream.h" @@ -88,6 +89,7 @@ #include "v3math.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentpicksinfo.h" #include "llagentwearables.h" #include "llagentpilot.h" @@ -115,6 +117,7 @@ #include "llimagebmp.h" #include "llinventorybridge.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llfriendcard.h" #include "llkeyboard.h" #include "llloginhandler.h" // gLoginHandler, SLURL support @@ -937,6 +940,9 @@ bool idle_startup() // Load Avatars icons cache LLAvatarIconIDCache::getInstance()->load(); + + // Load media plugin cookies + LLViewerMedia::loadCookieFile(); //------------------------------------------------- // Handle startup progress screen @@ -1134,6 +1140,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 @@ -1172,7 +1179,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 @@ -1336,8 +1343,8 @@ bool idle_startup() gAgent.setPositionAgent(agent_start_position_region); gAgent.resetAxes(gAgentStartLookAt); - gAgent.stopCameraAnimation(); - gAgent.resetCamera(); + gAgentCamera.stopCameraAnimation(); + gAgentCamera.resetCamera(); // Initialize global class data needed for surfaces (i.e. textures) if (!gNoRender) @@ -1741,7 +1748,7 @@ bool idle_startup() { LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size() << LL_ENDL; - std::vector<LLUUID> item_ids; + uuid_vec_t item_ids; for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(), end = gesture_options.endArray(); resp_it != end; ++resp_it) { @@ -1755,7 +1762,7 @@ bool idle_startup() // Could schedule and delay these for later. const BOOL no_inform_server = FALSE; const BOOL no_deactivate_similar = FALSE; - LLGestureManager::instance().activateGestureWithAsset(item_id, asset_id, + LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id, no_inform_server, no_deactivate_similar); // We need to fetch the inventory items for these gestures @@ -1764,7 +1771,7 @@ bool idle_startup() } } // no need to add gesture to inventory observer, it's already made in constructor - LLGestureManager::instance().fetchItems(item_ids); + LLGestureMgr::instance().fetchItems(item_ids); } } gDisplaySwapBuffers = TRUE; @@ -1810,15 +1817,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(); } } else @@ -1841,7 +1848,7 @@ bool idle_startup() } //DEV-17797. get null folder. Any items found here moved to Lost and Found - LLInventoryModel::findLostItems(); + LLInventoryModelBackgroundFetch::instance().findLostItems(); LLStartUp::setStartupState( STATE_PRECACHE ); timeout.reset(); @@ -1859,7 +1866,7 @@ bool idle_startup() if (gAgent.isFirstLogin() && !sInitialOutfit.empty() // registration set up an outfit && !sInitialOutfitGender.empty() // and a gender - && gAgent.getAvatarObject() // can't wear clothes without object + && isAgentAvatarValid() // can't wear clothes without object && !gAgent.isGenderChosen() ) // nothing already loading { // Start loading the wearables, textures, gestures @@ -1867,7 +1874,7 @@ bool idle_startup() } // wait precache-delay and for agent's avatar or a lot longer. - if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) + if(((timeout_frac > 1.f) && isAgentAvatarValid()) || (timeout_frac > 3.f)) { LLStartUp::setStartupState( STATE_WEARABLES_WAIT ); @@ -1923,8 +1930,8 @@ bool idle_startup() if (gAgent.isFirstLogin()) { // wait for avatar to be completely loaded - if (gAgent.getAvatarObject() - && gAgent.getAvatarObject()->isFullyLoaded()) + if (isAgentAvatarValid() + && gAgentAvatarp->isFullyLoaded()) { //llinfos << "avatar fully loaded" << llendl; LLStartUp::setStartupState( STATE_CLEANUP ); @@ -2531,7 +2538,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, llinfos << "starting" << llendl; // Not going through the processAgentInitialWearables path, so need to set this here. - LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); + LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); // Initiate creation of COF, since we're also bypassing that. gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); @@ -2562,13 +2569,13 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); - LLAppearanceManager::instance().wearInventoryCategory(cat, do_copy, do_append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append); } // Copy gestures LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); LLPointer<LLInventoryCallback> cb(NULL); - LLAppearanceManager *app_mgr = &(LLAppearanceManager::instance()); + LLAppearanceMgr *app_mgr = &(LLAppearanceMgr::instance()); // - Copy gender-specific gestures. LLUUID gestures_cat_id = findDescendentCategoryIDByName( @@ -2577,7 +2584,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, if (gestures_cat_id.notNull()) { callAfterCategoryFetch(gestures_cat_id, - boost::bind(&LLAppearanceManager::shallowCopyCategory, + boost::bind(&LLAppearanceMgr::shallowCopyCategory, app_mgr, gestures_cat_id, dst_id, @@ -2591,7 +2598,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, if (common_gestures_cat_id.notNull()) { callAfterCategoryFetch(common_gestures_cat_id, - boost::bind(&LLAppearanceManager::shallowCopyCategory, + boost::bind(&LLAppearanceMgr::shallowCopyCategory, app_mgr, common_gestures_cat_id, dst_id, @@ -2719,6 +2726,8 @@ void LLStartUp::postStartupState() void reset_login() { + gAgentWearables.cleanup(); + gAgentCamera.cleanup(); gAgent.cleanup(); LLWorld::getInstance()->destroyClass(); @@ -3078,6 +3087,13 @@ bool process_login_success_response() } } + // Start the process of fetching the OpenID session cookie for this user login + std::string openid_url = response["openid_url"]; + if(!openid_url.empty()) + { + std::string openid_token = response["openid_token"]; + LLViewerMedia::openIDSetup(openid_url, openid_token); + } bool success = false; // JC: gesture loading done below, when we have an asset system |