diff options
author | Euclid Linden <euclid@lindenlab.com> | 2022-04-18 21:56:26 +0000 |
---|---|---|
committer | Euclid Linden <euclid@lindenlab.com> | 2022-04-18 21:56:26 +0000 |
commit | e71201ac125cab5f3d3cf7d6a30500253fc29d90 (patch) | |
tree | 270e46eb85dd46fb6962a36a9357dbf31c3afb29 /indra/newview/llstartup.cpp | |
parent | 2d63d2044e0a00d1969c3da254e016a6e520c0d5 (diff) | |
parent | 035b1996df3f357b5060e3eb778588da5b9e7b37 (diff) |
Merged in DV528-merge-6.5.5 (pull request #945)
DRTVWR-528 merge up to 6.5.5
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e08c5cf793..58c2b2dd60 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1170,6 +1170,10 @@ bool idle_startup() } } + else if (reason_response == "BadType") + { + LLNotificationsUtil::add("LoginFailedToParse", LLSD(), LLSD(), login_alert_done); + } else if (!message.empty()) { // This wasn't a certificate error, so throw up the normal @@ -1816,6 +1820,17 @@ bool idle_startup() // This method MUST be called before gInventory.findCategoryUUIDForType because of // gInventory.mIsAgentInvUsable is set to true in the gInventory.buildParentChildMap. gInventory.buildParentChildMap(); + + // If buildParentChildMap succeeded, inventory will now be in + // a usable state and gInventory.isInventoryUsable() will be + // true. + + // if inventory is unusable, show warning. + if (!gInventory.isInventoryUsable()) + { + LLNotificationsUtil::add("InventoryUnusable"); + } + gInventory.createCommonSystemCategories(); // It's debatable whether this flag is a good idea - sets all @@ -1848,6 +1863,7 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState( STATE_MISC ); display_startup(); + return FALSE; } @@ -2137,7 +2153,10 @@ bool idle_startup() if (gAgent.isOutfitChosen() && (wearables_time > max_wearables_time)) { - LLNotificationsUtil::add("ClothingLoading"); + if (gInventory.isInventoryUsable()) + { + LLNotificationsUtil::add("ClothingLoading"); + } record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time); LLStartUp::setStartupState( STATE_CLEANUP ); } @@ -2200,10 +2219,6 @@ bool idle_startup() // Have the agent start watching the friends list so we can update proxies gAgent.observeFriends(); - if (gSavedSettings.getBOOL("LoginAsGod")) - { - gAgent.requestEnterGodMode(); - } // Start automatic replay if the flag is set. if (gSavedSettings.getBOOL("StatsAutoRun") || gAgentPilot.getReplaySession()) @@ -2684,19 +2699,34 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, gAgentAvatarp->setSex(gender); - // try to find the outfit - if not there, create some default - // wearables. + // try to find the requested outfit or folder + + // -- check for existing outfit in My Outfits + bool do_copy = false; LLUUID cat_id = findDescendentCategoryIDByName( - gInventory.getLibraryRootFolderID(), + gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS), outfit_folder_name); + + // -- check for existing folder in Library if (cat_id.isNull()) { + cat_id = findDescendentCategoryIDByName( + gInventory.getLibraryRootFolderID(), + outfit_folder_name); + if (!cat_id.isNull()) + { + do_copy = true; + } + } + + if (cat_id.isNull()) + { + // -- final fallback: create standard wearables LL_DEBUGS() << "standard wearables" << LL_ENDL; gAgentWearables.createStandardWearables(); } else { - bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); // Need to fetch cof contents before we can wear. @@ -3571,6 +3601,19 @@ bool process_login_success_response() } } + std::string fake_initial_outfit_name = gSavedSettings.getString("FakeInitialOutfitName"); + if (!fake_initial_outfit_name.empty()) + { + gAgent.setFirstLogin(TRUE); + sInitialOutfit = fake_initial_outfit_name; + if (sInitialOutfitGender.empty()) + { + sInitialOutfitGender = "female"; // just guess, will get overridden when outfit is worn anyway. + } + + LL_WARNS() << "Faking first-time login with initial outfit " << sInitialOutfit << LL_ENDL; + } + // set the location of the Agent Appearance service, from which we can request // avatar baked textures if they are supported by the current region std::string agent_appearance_url = response["agent_appearance_service"]; |