diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-22 11:17:01 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-22 11:17:01 +0800 |
commit | 1bc3c10bed75272dbe9137609048a1aa7c678ffe (patch) | |
tree | 02de9b735321beb68dc3fe573fa022af3164c382 /indra/newview | |
parent | 561afee750f2c47005c67733547f47ae8bdb3012 (diff) |
Showing arrivals and departures can be toggled now
and by default it's off.
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 e03fc429bf..727d5f25ec 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 62884ecb3c..4aafe1b1fb 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -812,7 +812,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"); @@ -2464,18 +2467,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> |