diff options
| author | TJ <tj8@live.com.au> | 2024-09-07 00:08:32 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-06 17:08:32 +0300 |
| commit | 6af471482d6801530915c1c9ae4bdf788af52eae (patch) | |
| tree | e12f8e186d043ce7379c4e8734bbc68b9243a7c2 /indra/newview/llagent.cpp | |
| parent | 256ac6e9627073903614263476f357f368082edb (diff) | |
Add toggles to avatar dropdown for hear sound or voice from avatar. (#2518, #2519)
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c4336758ac..7c37cc1c00 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -355,6 +355,20 @@ bool LLAgent::isMicrophoneOn(const LLSD& sdname) return LLVoiceClient::getInstance()->getUserPTTState(); } +//static +void LLAgent::toggleHearMediaSoundFromAvatar() +{ + const S32 mediaSoundsEarLocation = gSavedSettings.getS32("MediaSoundsEarLocation"); + gSavedSettings.setS32("MediaSoundsEarLocation", !mediaSoundsEarLocation); +} + +//static +void LLAgent::toggleHearVoiceFromAvatar() +{ + const S32 voiceEarLocation = gSavedSettings.getS32("VoiceEarLocation"); + gSavedSettings.setS32("VoiceEarLocation", !voiceEarLocation); +} + // ************************************************************ // Enabled this definition to compile a 'hacked' viewer that // locally believes the end user has godlike powers. |
