From a105b2367ece67dd9c10634d260c3e19e15d8a3a Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 2 Jul 2020 21:59:14 -0400 Subject: [PATCH] Small opt to nametag draw --- indra/newview/llvoavatar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bfa4c3c0cf4..3b24c6091e6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3331,7 +3331,10 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) std::deque<LLChat>::iterator chat_iter = mChats.begin(); mNameText->clearString(); - LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" ); + static LLUIColor user_chat_color = LLUIColorTable::instance().getColor("UserChatColor"); + static LLUIColor agent_chat_color = LLUIColorTable::instance().getColor("AgentChatColor"); + + LLColor4 new_chat = isSelf() ? user_chat_color : agent_chat_color ; LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) -- GitLab