diff --git a/code/nel/src/sound/driver/source.cpp b/code/nel/src/sound/driver/source.cpp index ace98ff81..2f96d74d8 100644 --- a/code/nel/src/sound/driver/source.cpp +++ b/code/nel/src/sound/driver/source.cpp @@ -26,15 +26,12 @@ namespace NLSOUND // common method used only with OptionManualRolloff. return the volume in 1/100th DB ( = mB) modified sint32 ISource::computeManualRollOff(sint32 volumeMB, sint32 mbMin, sint32 mbMax, double alpha, float sqrdist, float distMin, float distMax) { - // root square of max float value - static float maxSqrt = sqrt(std::numeric_limits::max()); - if (sqrdist < distMin * distMin) { // no attenuation return volumeMB; } - else if ((distMax < maxSqrt) && (sqrdist > distMax * distMax)) + else if (sqrdist > distMax * distMax) { // full attenuation return mbMin;