diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-08-21 13:55:07 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-08-21 13:55:07 +0800 |
| commit | 387bb8d4436f0262c1c9d319e9c1e87d6ecda82f (patch) | |
| tree | 8bef90f71086269fc7ec7148cf6f193b3cc1db5a /indra/newview/llvoavatar.cpp | |
| parent | 183e7dec6ae9fcf2b54c5c13b0e5363234656bdf (diff) | |
| parent | 06bfcd7e75a2659ba4eb2dd79e89b8476a3c33cf (diff) | |
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ae322910ea..64a9af9814 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -70,6 +70,7 @@ #include "llmeshrepository.h" #include "llmutelist.h" #include "llmoveview.h" +#include "llnotificationmanager.h" #include "llnotificationsutil.h" #include "llphysicsshapebuilderutil.h" #include "llquantize.h" @@ -815,6 +816,7 @@ 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 (!mFullyLoaded) { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); @@ -2495,6 +2497,20 @@ 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 (*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; + } + } } if (retval & LLViewerObject::INVALID_UPDATE) |
