diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-02 17:14:29 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-02 17:14:29 -0500 |
commit | 6d44848ded11bc7f83b725909d266658fab0cb99 (patch) | |
tree | 71abc43bd3040954466220c03d14acbe3881fb2f /indra/newview | |
parent | 6ea944b38f1e619df2c52283f6b33bbcc1cbbc40 (diff) |
For EXT-4173: New accounts sometimes appear half-naked. Fixed race condition that sometimes caused incomplete auto-populate folder to be worn
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llstartup.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6b816f8786..4d814169cb 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1849,7 +1849,7 @@ bool idle_startup() LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender ); } - +#if 0 // WHY 2x? BAP // We now have an inventory skeleton, so if this is a user's first // login, we can start setting up their clothing and avatar // appearance. This helps to avoid the generic "Ruth" avatar in @@ -1863,6 +1863,7 @@ bool idle_startup() // Start loading the wearables, textures, gestures LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender ); } +#endif // wait precache-delay and for agent's avatar or a lot longer. if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) @@ -2526,6 +2527,11 @@ bool callback_choose_gender(const LLSD& notification, const LLSD& response) void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ) { + // Not going through the processAgentInitialWearables path, so need to set this here. + LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); + // Initiate creation of COF, since we're also bypassing that. + gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + S32 gender = 0; std::string gestures; if (gender_name == "male") @@ -2544,7 +2550,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; LLNameCategoryCollector has_name(outfit_folder_name); - gInventory.collectDescendentsIf(LLUUID::null, + gInventory.collectDescendentsIf(gInventory.getLibraryRootFolderID(), cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH, @@ -2555,7 +2561,10 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } else { - LLAppearanceManager::instance().wearOutfitByName(outfit_folder_name); + LLInventoryCategory* cat = cat_array.get(0); + bool do_copy = true; + bool do_append = false; + LLAppearanceManager::instance().wearInventoryCategory(cat, do_copy, do_append); } LLAppearanceManager::instance().wearOutfitByName(gestures); LLAppearanceManager::instance().wearOutfitByName(COMMON_GESTURES_FOLDER); |