summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-05-11 17:48:04 -0700
committerRichard Linden <none@none>2010-05-11 17:48:04 -0700
commit709dd3f862c82e1db56e4a39e236c1d8b546984e (patch)
tree106493fbfa955b13d43d2a762ed86026259a4ff3 /indra/newview
parent45dcce5fdcfe09a19870f44c6667c63b48b10cee (diff)
parenteb1bf97b1eb32dfe30604a8e82e60a20d1807128 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llhudrender.cpp4
-rw-r--r--indra/newview/llviewermedia.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 5b653638f2..47fe641680 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -78,8 +78,8 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLVector3 up_axis;
if (orthographic)
{
- right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightRaw(), 0.f);
- up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw());
+ right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightScaled(), 0.f);
+ up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightScaled());
}
else
{
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1f6687bd83..4db05e8a98 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1934,13 +1934,13 @@ void LLViewerMediaImpl::updateVolume()
}
else if (mProximityCamera > gSavedSettings.getF32("MediaRollOffMin"))
{
- // attenuated_volume = v / ( 1 + (roll_off_rate * (d - min))^2
+ // 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;
- attenuation = attenuation * attenuation;
+ attenuation = 1.0 / (attenuation * attenuation);
// the attenuation multiplier should never be more than one since that would increase volume
- volume = volume * llmin(1.0, 1 /(attenuation + 1));
+ volume = volume * llmin(1.0, attenuation);
}
}