Name tag should now update consistently upon change via namefromchat bridge

This commit is contained in:
Shyotl
2011-04-09 00:30:15 -05:00
parent fcc98ffe46
commit b390d74b9c
2 changed files with 8 additions and 10 deletions

View File

@@ -3077,15 +3077,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
avatar->clearNameFromChat();
}
} else {
LLViewerObject *obj = gObjectList.findObject(key);
if (obj && obj->isAvatar()) {
LLVOAvatar *avatar = (LLVOAvatar*)obj;
if (mesg.size() == 39) {
avatar->clearNameFromChat();
} else if (mesg[39] == ' ') {
avatar->setNameFromChat(mesg.substr(40));
}
}
LLVOAvatar *avatar = gObjectList.findAvatar(key);
if (mesg.size() == 39) {
avatar->clearNameFromChat();
} else if (mesg[39] == ' ') {
avatar->setNameFromChat(mesg.substr(40));
}
return;
} else if (mesg.substr(2, 9) == " floater ") {

View File

@@ -3881,7 +3881,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
(title && mTitle != title->getString()) ||
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) ||
is_appearance != mNameAppearance || client != mClientName ||
mNameFromAttachment != nameplate)
mNameFromAttachment != nameplate ||
mNameFromChatChanged)
{
mRenderedName = usedname;
mNameFromAttachment = nameplate;
@@ -3933,6 +3934,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
line = "%f\n%l";
}
}
mNameFromChatChanged = false;
// replace first name, last name and title
while ((index = line.find("%f")) != std::string::npos)