aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-09-11 23:57:15 -0700
committerChris Robinson <[email protected]>2010-09-11 23:57:15 -0700
commit8953a73fb16e80d3309912f56c4ecd62045967ec (patch)
tree00a39a360964a4be6909f8aae15bd2135e744cb5 /Alc
parent1a2883ae9ad38f0c896fb711b28127e2c5ae37cd (diff)
Prevent effectiveDist from going negative
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 0cccf0f0..5f104991 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -428,7 +428,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
WetGain[i] = SourceVolume * RoomAttenuation[i];
effectiveDist = 0.0f;
- if(MinDist > 0.0f)
+ if(MinDist > 0.0f && flAttenuation < 1.0f)
effectiveDist = (MinDist/flAttenuation - MinDist)*MetersPerUnit;
// Distance-based air absorption