Use NaCL nametag everywhere, even in radar
This commit is contained in:
@@ -3255,6 +3255,29 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
|
||||
return;
|
||||
std::string uuid_str = getTE(TEX_HEAD_BODYPAINT)->getID().asString(); //UUID of the head texture
|
||||
|
||||
if(isFullyLoaded())
|
||||
{
|
||||
//Zwagoth's new client identification - HgB
|
||||
// Overwrite the current tag/color settings if new method
|
||||
// exists -- charbl.
|
||||
const LLTextureEntry* texentry = getTE(0);
|
||||
if(texentry->getGlow() > 0.0)
|
||||
{
|
||||
llinfos << "Using new client identifier." << llendl;
|
||||
U8 tag_buffer[UUID_BYTES+1];
|
||||
memset(&tag_buffer, 0, UUID_BYTES);
|
||||
memcpy(&tag_buffer[0], &texentry->getID().mData, UUID_BYTES);
|
||||
tag_buffer[UUID_BYTES] = 0;
|
||||
U32 tag_len = strlen((const char*)&tag_buffer[0]);
|
||||
tag_len = (tag_len>UUID_BYTES) ? (UUID_BYTES) : tag_len;
|
||||
client = std::string((char*)&tag_buffer[0], tag_len);
|
||||
LLStringFn::replace_ascii_controlchars(mClientTag, LL_UNKNOWN_CHAR);
|
||||
mNameString.clear();
|
||||
color = texentry->getColor();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static const LLCachedControl<LLColor4> avatar_name_color(gColors,"AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
|
||||
if (isSelf())
|
||||
{
|
||||
@@ -3550,38 +3573,15 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
|
||||
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
||||
|
||||
|
||||
//As pointed out by Zwagoth, we really shouldn't be doing this per-frame. Skip if we already have the data. -HgB
|
||||
if (mClientTag == "")
|
||||
{
|
||||
mClientColor = gColors.getColor( "AvatarNameColor" );
|
||||
if(isFullyLoaded())
|
||||
getClientInfo(mClientTag,mClientColor);
|
||||
if(mClientTag == "")
|
||||
{
|
||||
//Zwagoth's new client identification - HgB
|
||||
// Overwrite the current tag/color settings if new method
|
||||
// exists -- charbl.
|
||||
const LLTextureEntry* texentry = getTE(0);
|
||||
if(texentry->getGlow() > 0.0)
|
||||
{
|
||||
llinfos << "Using new client identifier." << llendl;
|
||||
U8 tag_buffer[UUID_BYTES+1];
|
||||
memset(&tag_buffer, 0, UUID_BYTES);
|
||||
memcpy(&tag_buffer[0], &texentry->getID().mData, UUID_BYTES);
|
||||
tag_buffer[UUID_BYTES] = 0;
|
||||
U32 tag_len = strlen((const char*)&tag_buffer[0]);
|
||||
tag_len = (tag_len>UUID_BYTES) ? (UUID_BYTES) : tag_len;
|
||||
mClientTag = std::string((char*)&tag_buffer[0], tag_len);
|
||||
LLStringFn::replace_ascii_controlchars(mClientTag, LL_UNKNOWN_CHAR);
|
||||
mNameString.clear();
|
||||
mClientColor = texentry->getColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
//llinfos << "Using Emerald-style client identifier." << llendl;
|
||||
//The old client identification. Used only if the new method doesn't exist, so that it isn't automatically overwritten. -HgB
|
||||
getClientInfo(mClientTag,mClientColor);
|
||||
if(mClientTag == "")
|
||||
client = "?"; //prevent console spam..
|
||||
}
|
||||
client = "?"; //prevent console spam..
|
||||
}
|
||||
|
||||
// Overwrite the tag/color shit yet again if we want to see
|
||||
|
||||
Reference in New Issue
Block a user