1.1 --- a/plugins/include/sdktools_sound.inc Sat Sep 03 14:11:38 2011 -0400
1.2 +++ b/plugins/include/sdktools_sound.inc Sat Sep 03 14:18:08 2011 -0400
1.3 @@ -257,6 +257,15 @@
1.4 bool:updatePos = true,
1.5 Float:soundtime = 0.0,
1.6 any:...);
1.7 +
1.8 +/**
1.9 + *Calculates gain of sound on given distance with given sound level in decibel
1.10 + *
1.11 + * @param soundlevel decibel of sound, like SNDLEVEL_NORMAL or integer value
1.12 + * @param distance distance of sound to calculate, not meter or feet, but Source Engine`s normal Coordinate unit
1.13 + * @return gain of sound. you can multiply this with original sound`s volume to calculate volume on given distance
1.14 + */
1.15 +native Float:GetDistGainFromSoundLevel(soundlevel, Float:distance);
1.16
1.17 /**
1.18 * Called when an ambient sound is about to be emitted to one or more clients.