From a5099524e2a89d0162053c7165468b72bcaa2571 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 19 Feb 2010 15:14:14 -0800 Subject: Avatars with legacy names have special color name tags --- indra/newview/llvoavatar.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 73f292cbca..69a4abcdae 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3000,10 +3000,10 @@ LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) (projected_vec(local_camera_at * root_rot, camera_to_av)); name_position += pixel_up_vec * 15.f; return name_position; - } +} void LLVOAvatar::idleUpdateNameTagColor(BOOL new_name, F32 alpha) - { +{ llassert(mNameText); bool is_friend = LLAvatarTracker::instance().isBuddy(getID()); @@ -3011,7 +3011,22 @@ void LLVOAvatar::idleUpdateNameTagColor(BOOL new_name, F32 alpha) || alpha != mNameAlpha || is_friend != mNameFriend) { - const char* color_name = (is_friend ? "AvatarNameFriendColor" : "AvatarNameColor"); + const char* color_name = "AvatarNameColor"; + if (is_friend) + { + color_name = "AvatarNameFriendColor"; + } + else + { + // IDEVO can we avoid doing this lookup repeatedly? + LLAvatarName av_name; + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(getID(), &av_name) + && av_name.mIsLegacy) + { + color_name = "AvatarNameLegacyColor"; + } + } LLColor4 avatar_name_color = LLUIColorTable::getInstance()->getColor( color_name ); avatar_name_color.setAlpha(alpha); -- cgit v1.2.3