diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-23 22:45:04 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-23 22:45:04 +0800 |
commit | f95c6a4d8d9887c75f23e0512645143760f26210 (patch) | |
tree | 100f84649cb7f69fa4371bd80b9a78f659eee53c /indra/newview/llvoavatar.cpp | |
parent | a9113d199645fcd3db46e120c0d9e86fb3f1ce93 (diff) | |
parent | 2b0a318facb9b698ed6818be6e0f4488cb6ba272 (diff) |
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2634e0d12a..0f339405be 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -816,9 +816,20 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (gSavedSettings.getBOOL("IMShowArrivalsDepartures") && !getFullname().empty()) + if (gSavedSettings.getBOOL("IMShowArrivalsDepartures")) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + if (!display_name.empty()) + { + LLChat chat{llformat("%s left.", display_name.c_str())}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLSD args; + args["COLOR"] = "ChatHistoryTextColor"; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + } } if (!mFullyLoaded) { @@ -2511,8 +2522,18 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, { if (*id_it == getID() && !isSelf()) { - LLNotificationsUI::LLNotificationManager::instance() - .onChat(LLChat{llformat("%s arrived (%.1f m).", getFullname().c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + if (!display_name.empty()) + { + LLChat chat{llformat("%s arrived (%.1f m).", display_name.c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLSD args; + args["COLOR"] = "ChatHistoryTextColor"; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + } break; } } |