Replace the tricky copy-paste-everywhere Display Name system code with a unified function
Only does that, dun believe me? Take a look, oh... it also corrects improper interpretations of the PhoenixNameSystem value: 1 is both, 2 is displays, 0 and anything else is Legacy. Also replaces a bit of the display name support code with new system... by definition this shouldn't change the log file, only the title of the session.. because of my bad connection during week days, I can not confirm this working 100%, but if it does end up changing the logs under certain unseen conditions, replace the new name check with gCacheName->getFullName(id, name) but this reallllly shouldn't happen!
This commit is contained in:
@@ -627,37 +627,11 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
|
||||
{
|
||||
msg.assign("");
|
||||
std::string fullname;
|
||||
if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
|
||||
if(mClosestAgentToCursor.notNull() && LLAvatarNameCache::getPNSName(mClosestAgentToCursor, fullname))
|
||||
{
|
||||
//msg.append(fullname);
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
|
||||
// [Ansariel: Display name support]
|
||||
// msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname) );
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
msg.append(RlvStrings::getAnonym(fullname));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LLAvatarNameCache::useDisplayNames())
|
||||
{
|
||||
LLAvatarName avatar_name;
|
||||
if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name))
|
||||
{
|
||||
static const LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0);
|
||||
if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault))
|
||||
{
|
||||
fullname = avatar_name.mDisplayName;
|
||||
}
|
||||
else
|
||||
{
|
||||
fullname = avatar_name.getCompleteName(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
msg.append(fullname);
|
||||
}
|
||||
// [/Ansariel: Display name support]
|
||||
msg.append( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname) );
|
||||
// [/RLVa:KB]
|
||||
msg.append("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user