From 8953a73fb16e80d3309912f56c4ecd62045967ec Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 11 Sep 2010 23:57:15 -0700 Subject: [PATCH] Prevent effectiveDist from going negative --- Alc/ALu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.4.GIT