summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-25 20:01:52 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-25 20:01:52 +0100
commitb59a80f20bd6b778ea9edfe8f5b78b2e5a25864e (patch)
treeab427e6392e7e591df99b4f714de49eb52aefadc /indra/newview/llviewermedia.cpp
parent39b7e080cc9c774340bda4e2c31414874d88914f (diff)
parent8da5677f8a233ed7769b6414ed5223d75512d887 (diff)
merge from viewer-public
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);