summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llvoavatar.cpp28
-rw-r--r--indra/newview/skins/default/xui/en/menu_im_session_showmodes.xml8
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>