Feature request: Add EnableNongestureSounds as an opposite to gesture mute

This commit is contained in:
Inusaito Sayori
2013-12-10 15:56:07 -05:00
parent a59940c592
commit 13f26e6b5a
2 changed files with 34 additions and 3 deletions

View File

@@ -6153,6 +6153,28 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableNongestureSounds</key>
<map>
<key>Comment</key>
<string>Play sounds from non-gestures</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableNongestureSoundsSelf</key>
<map>
<key>Comment</key>
<string>Play sounds from your non-gestures when EnableNongestureSounds is false. (Useless otherwise)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableMouselook</key>
<map>
<key>Comment</key>

View File

@@ -5287,10 +5287,19 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
}
// Don't play sounds from gestures if they are not enabled.
if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds"))
if (object_id == owner_id)
{
// Don't mute own gestures, if they're not muted.
if (owner_id != gAgentID || !gSavedSettings.getBOOL("EnableGestureSoundsSelf"))
if (!gSavedSettings.getBOOL("EnableGestureSounds"))
{
// Don't mute own gestures, if they're not muted.
if (owner_id != gAgentID || !gSavedSettings.getBOOL("EnableGestureSoundsSelf"))
return;
}
}
else if (!gSavedSettings.getBOOL("EnableNongestureSounds"))
{
// Don't mute own non-gestures, if they're not muted.
if (owner_id != gAgentID || !gSavedSettings.getBOOL("EnableNongestureSoundsSelf"))
return;
}