Our first change of many:

in sfxCommon.h around line 152 you should see enum SFXDistanceModel

after SFXDistanceModelLogarithmic add:

SFXDistanceModelExponent,then at line 189 after break; ad

case SFXDistanceModelExponent: distance = getMax(distance, minDistance); distance = getMin(distance, maxDistance); gain = pow((distance / minDistance), (-rolloffFactor)); break;Then in sfxDSDevice.cpp at line 203 you will see SFXDevice::setDistanceModel

in the switch below break at case SFXDistanceModelLogarithmic:

add

case SFXDistanceModelExponent: Con::errorf("SFXDSDevice::setDistanceModel - 'exponential' distance attenuation not supported by DirectSound"); break;I'm not sure whether directsound has an exponential attenuation feature but just in case it doesnt i thought it best to sort it out with an error here.

Next in sfxALDevice.cpp find SFXALDevice::setDistanceModel under the case SFXDistanceModelLogarithmic break;

add:

case SFXDistanceModelExponent: mOpenAL.alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED); if (mUserRolloffFactor != mRolloffFactor) _setRolloffFactor(mUserRolloffFactor); break;You could just copy and paste the logarithmic case here and change the values to be exponent but that would just be lazy...........

Next in sfxSystem.cpp

Find around line 94

{ SFXDistanceModelLogarithmic, "Logarithmic",

"Volume attenuates logarithmically starting from the reference distance and halving every reference distance step from there on. "

"Attenuation stops at max distance but volume won't reach zero." },

Below this add

{ SFXDistanceModelExponent, "Exponential", "Volume attenuates exponentially starting from the reference distance and attenuating every reference distance step by the rolloff factor. " "Attenuation stops at max distance but volume won't reach zero." },Because we are using AL_EXPONENT_DISTANCE_CLAMPED the volume attenuation stops when the source reaches max distance.

Then load up your level in the world editor choose thelevelinfo from the mission group and scroll down to sound, under that change soundDistanceModel to Exponential. Done now any sound profiles that you have you can create an exponential rolloff attenuation rather than a linear rolloff.