summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-07-19 21:15:52 +0300
committerGitHub <noreply@github.com>2023-07-19 21:15:52 +0300
commit3058e6e6fd66ad4abb91fa5354ee11f6b7843a02 (patch)
treeb18fa67f59c74d9dde9008b8d42105de38509ae7 /indra/newview/llstartup.cpp
parentacf82867b61535b7b39b89f71a282e3ce3d0673e (diff)
SL-20015 wait for the outfit items to load before wearing it
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9f9e117760..c925563919 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1912,7 +1912,22 @@ bool idle_startup()
LLInventoryModelBackgroundFetch::instance().start();
gInventory.createCommonSystemCategories();
+ LLStartUp::setStartupState(STATE_INVENTORY_CALLBACKS );
+ display_startup();
+
+ return FALSE;
+ }
+ //---------------------------------------------------------------------
+ // STATE_INVENTORY_CALLBACKS
+ //---------------------------------------------------------------------
+ if (STATE_INVENTORY_CALLBACKS == LLStartUp::getStartupState())
+ {
+ if (!LLInventoryModel::isSysFoldersReady())
+ {
+ display_startup();
+ return FALSE;
+ }
LLInventoryModelBackgroundFetch::instance().start();
LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
LLViewerInventoryCategory* cof = gInventory.getCategory(cof_id);
@@ -2850,8 +2865,15 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
// Need to fetch cof contents before we can wear.
- callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(),
+ if (do_copy)
+ {
+ callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(),
boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append));
+ }
+ else
+ {
+ callAfterCategoryLinksFetch(cat_id, boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append));
+ }
LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL;
}
@@ -2904,6 +2926,7 @@ std::string LLStartUp::startupStateToString(EStartupState state)
RTNENUM( STATE_AGENT_SEND );
RTNENUM( STATE_AGENT_WAIT );
RTNENUM( STATE_INVENTORY_SEND );
+ RTNENUM(STATE_INVENTORY_CALLBACKS );
RTNENUM( STATE_MISC );
RTNENUM( STATE_PRECACHE );
RTNENUM( STATE_WEARABLES_WAIT );