diff options
author | McCabe Maxsted | 2009-03-07 10:39:53 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-03-07 10:39:53 -0700 |
commit | 35f1a85fe1c7f18256f305f68c8b1e46f7b8696d (patch) | |
tree | 0781bfaa16ef564012919b10713436cf4dd42b7b /linden/indra/newview/llviewermessage.cpp | |
parent | Backported fix for VWR-4070 from 1.22 (diff) | |
download | meta-impy-35f1a85fe1c7f18256f305f68c8b1e46f7b8696d.zip meta-impy-35f1a85fe1c7f18256f305f68c8b1e46f7b8696d.tar.gz meta-impy-35f1a85fe1c7f18256f305f68c8b1e46f7b8696d.tar.bz2 meta-impy-35f1a85fe1c7f18256f305f68c8b1e46f7b8696d.tar.xz |
Applied patch by Zwagoth Klaar for muting sounds before decoding
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index b947f95..221de59 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -3286,6 +3286,10 @@ void process_sound_trigger(LLMessageSystem *msg, void **) | |||
3286 | msg->getVector3Fast(_PREHASH_SoundData, _PREHASH_Position, pos_local); | 3286 | msg->getVector3Fast(_PREHASH_SoundData, _PREHASH_Position, pos_local); |
3287 | msg->getF32Fast(_PREHASH_SoundData, _PREHASH_Gain, gain); | 3287 | msg->getF32Fast(_PREHASH_SoundData, _PREHASH_Gain, gain); |
3288 | 3288 | ||
3289 | //If we have sounds muted, don't even try to load or trigger the sound. | ||
3290 | if(gSavedSettings.getBOOL("MuteSounds") || gain == 0.0) | ||
3291 | return; | ||
3292 | |||
3289 | // adjust sound location to true global coords | 3293 | // adjust sound location to true global coords |
3290 | LLVector3d pos_global = from_region_handle(region_handle); | 3294 | LLVector3d pos_global = from_region_handle(region_handle); |
3291 | pos_global.mdV[VX] += pos_local.mV[VX]; | 3295 | pos_global.mdV[VX] += pos_local.mV[VX]; |
@@ -3317,7 +3321,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **) | |||
3317 | 3321 | ||
3318 | void process_preload_sound(LLMessageSystem *msg, void **user_data) | 3322 | void process_preload_sound(LLMessageSystem *msg, void **user_data) |
3319 | { | 3323 | { |
3320 | if (!gAudiop) | 3324 | if (!gAudiop || gSavedSettings.getBOOL("MuteSounds")) |
3321 | { | 3325 | { |
3322 | return; | 3326 | return; |
3323 | } | 3327 | } |
@@ -3363,6 +3367,9 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data) | |||
3363 | msg->getF32Fast(_PREHASH_DataBlock, _PREHASH_Gain, gain); | 3367 | msg->getF32Fast(_PREHASH_DataBlock, _PREHASH_Gain, gain); |
3364 | msg->getU8Fast(_PREHASH_DataBlock, _PREHASH_Flags, flags); | 3368 | msg->getU8Fast(_PREHASH_DataBlock, _PREHASH_Flags, flags); |
3365 | 3369 | ||
3370 | if(gSavedSettings.getBOOL("MuteSounds") || gain == 0.0) | ||
3371 | return; | ||
3372 | |||
3366 | LLViewerObject *objectp = gObjectList.findObject(object_id); | 3373 | LLViewerObject *objectp = gObjectList.findObject(object_id); |
3367 | if (!objectp) | 3374 | if (!objectp) |
3368 | { | 3375 | { |