Prevent effectiveDist from going negative
This commit is contained in:
parent
1a2883ae9a
commit
8953a73fb1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user