build 190403. support for combined rail squeal sound, ai braking logic tweaks

This commit is contained in:
tmj-fstate
2019-04-04 01:16:00 +02:00
parent 449cd9f637
commit a081077c2f
3 changed files with 22 additions and 13 deletions

View File

@@ -4087,6 +4087,10 @@ void TDynamicObject::RenderSounds() {
}
if( volume > 0.05 ) {
rscurve
.pitch(
true == rscurve.is_combined() ?
MoverParameters->Vel * 0.01f :
rscurve.m_frequencyoffset + rscurve.m_frequencyfactor * 1.f )
.gain( 2.5 * volume )
.play( sound_flags::exclusive | sound_flags::looping );
}