diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2932af85f..02a2f6a73 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -713,6 +713,17 @@ Value 0 + AscentUpdateTagsOnLoad + + Comment + Allowed client to update client definitions file. + Persist + 1 + Type + Boolean + Value + 0 + AscentUploadFolder Comment diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 9277b8a3a..3e71b9046 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -39,6 +39,7 @@ #include "llcolorswatch.h" #include "llvoavatar.h" #include "llagent.h" +#include "llfloaterchat.h" #include "llstartup.h" #include "llviewercontrol.h" #include "v4color.h" @@ -63,6 +64,7 @@ public: private: static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); static void onCommitColor(LLUICtrl* ctrl, void* user_data); + static void onManualClientUpdate(void* data); void refreshValues(); //General BOOL mUseAccountSettings; @@ -93,6 +95,7 @@ LLPrefsAscentVanImpl::LLPrefsAscentVanImpl() childSetCommitCallback("Y Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets); childSetCommitCallback("Z Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets); + childSetAction("update_clientdefs", onManualClientUpdate, this); refresh(); } @@ -120,6 +123,30 @@ void LLPrefsAscentVanImpl::onCommitColor(LLUICtrl* ctrl, void* user_data) } } +void LLPrefsAscentVanImpl::onManualClientUpdate(void* data) +{ + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = llformat("Definitions already up-to-date."); + if (LLVOAvatar::updateClientTags()) + { + chat.mText = llformat("Client definitions updated."); + LLVOAvatar::loadClientTags(); + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* avatarp = (LLVOAvatar*) *iter; + if(avatarp) + { + LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); + avatarp->mClientTag = ""; + } + } + } + LLFloaterChat::addChat(chat); + +} + //static void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 406c8dd76..6ad5cd0dc 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -48,6 +48,7 @@ #include "llemote.h" #include "llfirstuse.h" +#include "llfloaterchat.h" #include "llheadrotmotion.h" #include "llhudeffecttrail.h" @@ -1525,7 +1526,17 @@ void LLVOAvatar::initClass() } { - updateClientTags(); + if (gSavedSettings.getBOOL("AscentUpdateTagsOnLoad")) + { + if (updateClientTags()) + { + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = llformat("Client definitions are up-to-date."); + LLFloaterChat::addChat(chat); + } + } + loadClientTags(); } } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml index e2c6b3f58..fe97aa822 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml @@ -15,9 +15,9 @@ - - + + +