diff options
author | James Cook <james@lindenlab.com> | 2010-02-24 14:31:46 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-24 14:31:46 -0800 |
commit | f3e0e9a5264a80d146a1d4d77fd9c4f5d3070278 (patch) | |
tree | dcefc0dd92c17186fc09e232e06e6db1c10bc6db /indra/newview/llviewermessage.cpp | |
parent | 649bdf412f4cead9721b5393d3929b6fbd6df272 (diff) |
Hack to refresh name tags when I change my display name.
Also fixes a crash when turning on display names.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5b16347db3..1a4d34b217 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -33,9 +33,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewermessage.h" +// Linden libraries #include "llanimationstates.h" #include "llaudioengine.h" #include "llavataractions.h" +#include "llavatarnamecache.h" // IDEVO HACK #include "lscript_byteformat.h" #include "lleconomy.h" #include "lleventtimer.h" @@ -82,6 +84,7 @@ #include "llspeakers.h" #include "lltrans.h" #include "llviewerfoldertype.h" +#include "llvoavatar.h" // IDEVO HACK #include "lluri.h" #include "llviewergenericmessage.h" #include "llviewermenu.h" @@ -2661,6 +2664,20 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) } chat.mText = mesg; + // IDEVO HACK Use chat to invalidate names + if (chat.mSourceType == CHAT_SOURCE_AGENT + && chat.mText == "refreshname") + { + LLAvatarNameCache::erase(chat.mFromID); + + // force name tag to update + LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(chatter); + if (avatar) + { + avatar->invalidateName(); + } + } + // Look for the start of typing so we can put "..." in the bubbles. if (CHAT_TYPE_START == chat.mChatType) { |