DRTVWR-559: Cleanup: Preserve note about legacy dist_atten magic number

meow-7.2.2
Ptolemy 2022-08-26 15:19:48 -07:00
parent 8b45dfd477
commit 55b071dcd7
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ float calcLegacyDistanceAttenuation(float distance, float falloff)
{
float dist_atten = 1.0 - clamp((distance + falloff)/(1.0 + falloff), 0.0, 1.0);
dist_atten *= dist_atten;
// Tweak falloff slightly to match pre-EEP attenuation
// NOTE: this magic number also shows up in a great many other places, search for dist_atten *= to audit
dist_atten *= 2.0;
return dist_atten;
}