diff options
author | Chris Robinson <[email protected]> | 2010-09-11 23:57:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-09-11 23:57:15 -0700 |
commit | 8953a73fb16e80d3309912f56c4ecd62045967ec (patch) | |
tree | 00a39a360964a4be6909f8aae15bd2135e744cb5 /Alc | |
parent | 1a2883ae9ad38f0c896fb711b28127e2c5ae37cd (diff) |
Prevent effectiveDist from going negative
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |