diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e202ee48d..ef5719c02 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8,6 +8,18 @@ settings_sh.xml settings_rlv.xml + + CCSAllowNameplateOverride + + Comment + Allow CCS HUD to override nameplates. + Persist + 1 + Type + Boolean + Value + 1 + HTTPRequestRate diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0623d51e9..f219fe860 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3523,9 +3523,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } // check attachments for nameplate override + static const LLCachedControl allow_nameplate_override ("CCSAllowNameplateOverride", true); std::string nameplate; attachment_map_t::iterator it, end=mAttachmentPoints.end(); - for (it=mAttachmentPoints.begin(); it!=end; ++it) { + if (allow_nameplate_override) for (it=mAttachmentPoints.begin(); it!=end; ++it) { // get attached object LLViewerJointAttachment *atm = it->second; if (!atm) continue; @@ -8417,6 +8418,22 @@ void LLVOAvatar::setCompositeUpdatesEnabled( BOOL b ) } } +void LLVOAvatar::setNameFromChat(const std::string &text) { + static const LLCachedControl allow_nameplate_override ("CCSAllowNameplateOverride", true); + if(allow_nameplate_override) { + mNameFromChatOverride = true; + mNameFromChatChanged = true; + mNameFromChatText = text; + } +} + +void LLVOAvatar::clearNameFromChat() { + mNameFromChatOverride = false; + mNameFromChatChanged = true; + mNameFromChatText = ""; +} + + void LLVOAvatar::addChat(const LLChat& chat) { std::deque::iterator chat_iter; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b50111e40..95d774dc3 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -559,8 +559,8 @@ public: void setCompositeUpdatesEnabled(BOOL b); - void setNameFromChat(const std::string &text) { mNameFromChatOverride = mNameFromChatChanged = true; mNameFromChatText = text; } - void clearNameFromChat() { mNameFromChatOverride = false; mNameFromChatChanged = true; mNameFromChatText = ""; } + void setNameFromChat(const std::string &text); + void clearNameFromChat(); public: