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 | |
parent | 8e9eff07325cd3973b9d0277f2865d1e1924730e (diff) | |
parent | 1bc3c10bed75272dbe9137609048a1aa7c678ffe (diff) |
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 28 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml | 8 |
3 files changed, 36 insertions, 11 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4d295eac53..745addd451 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -68,6 +68,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>IMShowArrivalsDepartures</key> + <map> + <key>Comment</key> + <string>Enable(disable) showing of arrivals and departures in the chat.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>CrashHostUrl</key> <map> <key>Comment</key> 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; + } } } } diff --git a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml index 94022ef1e3..f1cf8b9995 100644 --- a/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml +++ b/indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml @@ -46,4 +46,12 @@ function="IMSession.Menu.ShowModes.Enable" parameter="IMShowNamesForP2PConv" /> </menu_item_check> + <menu_item_check name="IMShowArrivalsDepartures" label="Show arrivals and departures"> + <menu_item_check.on_click + function="IMSession.Menu.Action" + parameter="IMShowArrivalsDepartures" /> + <menu_item_check.on_check + function="IMSession.Menu.ShowModes.CheckItem" + parameter="IMShowArrivalsDepartures" /> + </menu_item_check> </toggleable_menu> |