if (MSTSStream.VolumeCurves.Count > 0) for (int i = 0; i < MSTSStream.VolumeCurves.Count; i++) { float x; if (SoundSource.Car != null) x = ReadValue(MSTSStream.VolumeCurves[i].Control, SoundSource.Car); else if (SoundSource.Viewer.Camera.AttachedCar != null) x = ReadValue(MSTSStream.VolumeCurves[i].Control, (MSTSWagon)SoundSource.Viewer.Camera.AttachedCar); else x = SoundSource.DistanceSquared; volume *= Interpolate(x, MSTSStream.VolumeCurves[i]); } if (SoundSource.IsntThisCabView) volume *= 0.75f; if (SoundSource.IsExternal && SoundSource.Viewer.Camera.Style != Camera.Styles.External) volume *= 0.5f;
There is a line
x = SoundSource.DistanceSquared;
why? There aren't only DistanceControlled volume curves, there are also SpeedControlled ones and so on. So computing in general x from DistanceSquared is not understandable to me, and in fact in older versions of the file there wasn't this line.
I would also like to understand the conditions that lead to volume reduction to 75% and to 50%. Why two different values? And independently from the condition leading to it, reducing to 50% seems to me a big reduction.
My insufficient SW knowledge does not allow me to state if this/these is/are real bug/bugs.