summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b5175fbf71..fee2a742f5 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -5994,7 +5994,8 @@ void LLAppViewer::updateDiscordActivity()
return;
}
- if (gSavedSettings.getBOOL("ShowDiscordActivityDetails"))
+ static LLCachedControl<bool> show_details(gSavedSettings, "ShowDiscordActivityDetails", false);
+ if (show_details)
{
LLAvatarName av_name;
LLAvatarNameCache::get(gAgent.getID(), &av_name);
@@ -6005,7 +6006,8 @@ void LLAppViewer::updateDiscordActivity()
activity.SetDetails(name);
}
- if (gSavedSettings.getBOOL("ShowDiscordActivityState"))
+ static LLCachedControl<bool> show_state(gSavedSettings, "ShowDiscordActivityState", false);
+ if (show_state)
{
auto agent_pos_region = gAgent.getPositionAgent();
S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f);
@@ -6033,7 +6035,8 @@ void LLAppViewer::updateDiscordActivity()
uuid_vec_t chat_radius_uuids, near_me_uuids;
auto position = gAgent.getPositionGlobal();
world->getAvatars(&chat_radius_uuids, NULL, position, CHAT_NORMAL_RADIUS);
- world->getAvatars(&near_me_uuids, NULL, position, gSavedSettings.getF32("MPVNearMeRange"));
+ static LLCachedControl<F32> range(gSavedSettings, "MPVNearMeRange", 4096.0f);
+ world->getAvatars(&near_me_uuids, NULL, position, range);
discordpp::ActivityParty party;
party.SetId(location);
party.SetCurrentSize(chat_radius_uuids.size());