summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-22 11:32:51 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-22 11:32:51 +0800
commit2896fc6f15543b908c5809b8c6eaa05937bae1c7 (patch)
tree0fb2ed96747abc95b578a95bfb9edef604c01bfd /indra/newview/llvoavatar.cpp
parent8e9eff07325cd3973b9d0277f2865d1e1924730e (diff)
parent1bc3c10bed75272dbe9137609048a1aa7c678ffe (diff)
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp28
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;
+ }
}
}
}