summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-25 15:07:39 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-25 15:07:39 -0700
commita70d9363dadd23f5304013f87d47e5251d62c575 (patch)
tree774508d959bf46265f1d34dae2ab915c695c16bf /indra/newview/llviewermedia.cpp
parentb26d3f37bef4e10be2b5f7f4f6408485ed3ccae7 (diff)
parent687b4907216339b5ff2b79a5a6c5dfdfb6deeba2 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp2
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);