diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-05-25 16:06:34 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-05-25 16:06:34 -0400 |
commit | 1b56e796241f0efbcbe6a3f95d373220b6b54fad (patch) | |
tree | 6b6b74430317ad820a5ee2172a4b0a7c36089dac /indra/newview/llviewermedia.cpp | |
parent | 35fb83e1e3cc6c05b2319fd5b04897007c7923a2 (diff) | |
parent | 8da5677f8a233ed7769b6414ed5223d75512d887 (diff) |
automated 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); |