16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 04:19:19 +02:00

minor ai tweaks, minor bug fixes

This commit is contained in:
tmj-fstate
2018-06-13 16:52:42 +02:00
parent 457de678c3
commit c2f0df9a0b
3 changed files with 11 additions and 10 deletions

View File

@@ -6559,11 +6559,12 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
std::max( goalvolume, currentvolume - changerate ) :
std::min( goalvolume, currentvolume + changerate ) );
engine_turbo
.pitch( 0.4 + engine_turbo_pitch * 0.4 )
.gain( volume );
if( volume > 0.05 ) {
engine_turbo
.pitch( 0.4 + engine_turbo_pitch * 0.4 )
.gain( volume )
.play( sound_flags::exclusive | sound_flags::looping );
engine_turbo.play( sound_flags::exclusive | sound_flags::looping );
}
else {
engine_turbo.stop();
@@ -6597,7 +6598,7 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
if( ( true == Vehicle.Mains )
&& ( false == motors.empty() ) ) {
if( std::fabs( Vehicle.enrot ) > 0.01 ) {
if( std::abs( Vehicle.enrot ) > 0.01 ) {
auto const &motor { motors.front() };
// frequency calculation