summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e43b3b84c8..d1fd0133e7 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -224,6 +224,7 @@ extern S32 gStartImageHeight;
static bool gGotUseCircuitCodeAck = false;
static std::string sInitialOutfit;
static std::string sInitialOutfitGender; // "male" or "female"
+static boost::signals2::connection sWearablesLoadedCon;
static bool gUseCircuitCallbackCalled = false;
@@ -2429,6 +2430,8 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
else
{
+ sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit);
+
bool do_copy = true;
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
@@ -2474,6 +2477,24 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
}
+//static
+void LLStartUp::saveInitialOutfit()
+{
+ if (sInitialOutfit.empty()) return;
+
+ if (sWearablesLoadedCon.connected())
+ {
+ sWearablesLoadedCon.disconnect();
+ }
+
+ LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit);
+}
+
+std::string& LLStartUp::getInitialOutfitName()
+{
+ return sInitialOutfit;
+}
+
// Loads a bitmap to display during load
void init_start_screen(S32 location_id)
{
@@ -3040,7 +3061,7 @@ bool process_login_success_response()
// Default male and female avatars allowing the user to choose their avatar on first login.
// These may be passed up by SLE to allow choice of enterprise avatars instead of the standard
// "new ruth." Not to be confused with 'initial-outfit' below
- LLSD newuser_config = response["newuser-config"];
+ LLSD newuser_config = response["newuser-config"][0];
if(newuser_config.has("DefaultFemaleAvatar"))
{
gSavedSettings.setString("DefaultFemaleAvatar", newuser_config["DefaultFemaleAvatar"].asString());