diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-22 11:32:51 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-22 11:32:51 +0800 |
commit | 2896fc6f15543b908c5809b8c6eaa05937bae1c7 (patch) | |
tree | 0fb2ed96747abc95b578a95bfb9edef604c01bfd /indra/newview/llvoavatar.cpp | |
parent | 8e9eff07325cd3973b9d0277f2865d1e1924730e (diff) | |
parent | 1bc3c10bed75272dbe9137609048a1aa7c678ffe (diff) |
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 64a9af9814..2634e0d12a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -816,7 +816,10 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + if (gSavedSettings.getBOOL("IMShowArrivalsDepartures") && !getFullname().empty()) + { + LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + } if (!mFullyLoaded) { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); @@ -2497,18 +2500,21 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, { mDebugExistenceTimer.reset(); debugAvatarRezTime("AvatarRezArrivedNotification", "avatar arrived"); - uuid_vec_t uuids; - std::vector<LLVector3d> positions; - LLWorld::getInstance()->getAvatars(&uuids, &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("MPVNearMeRange")); - auto pos_it = positions.begin(); - auto id_it = uuids.begin(); - for (;pos_it != positions.end() && id_it != uuids.end(); ++pos_it, ++id_it) + if (gSavedSettings.getBOOL("IMShowArrivalsDepartures")) { - if (*id_it == getID() && !isSelf()) + uuid_vec_t uuids; + std::vector<LLVector3d> positions; + LLWorld::getInstance()->getAvatars(&uuids, &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("MPVNearMeRange")); + auto pos_it = positions.begin(); + auto id_it = uuids.begin(); + for (;pos_it != positions.end() && id_it != uuids.end(); ++pos_it, ++id_it) { - LLNotificationsUI::LLNotificationManager::instance() - .onChat(LLChat{llformat("%s arrived (%.1f m).", getFullname().c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}, LLSD{}); - break; + 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{}); + break; + } } } } |