diff options
author | Richard Linden <none@none> | 2010-05-25 10:15:09 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-05-25 10:15:09 -0700 |
commit | 1040c7039b9be8e78ff7623a418e14e2b7f2f30a (patch) | |
tree | ff10f9b8f75a415941b58d01c29741e002b7fcd4 /indra/newview/llviewermedia.cpp | |
parent | a781dd767c095470897049b5ae1a91523214b39a (diff) | |
parent | e98a52a211e7c5d0fad777e561e5a55fcd3e28cd (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 7429a49ccf..e5c5a607dd 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1937,7 +1937,7 @@ void LLViewerMediaImpl::updateVolume() // attenuated_volume = 1 / (roll_off_rate * (d - min))^2 // the +1 is there so that for distance 0 the volume stays the same F64 adjusted_distance = mProximityCamera - gSavedSettings.getF32("MediaRollOffMin"); - F64 attenuation = gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance; + F64 attenuation = 1.0 + (gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance); attenuation = 1.0 / (attenuation * attenuation); // the attenuation multiplier should never be more than one since that would increase volume volume = volume * llmin(1.0, attenuation); |