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

build 210424. soundproofing enhancement, battery sound, heating command propagation, memory cell command retrieval logic enhancement, coupling mode logic enhancement, motor overload relay threshold cab control animation fix, cab control fallback sound activation fixes,

This commit is contained in:
tmj-fstate
2021-04-24 19:37:16 +02:00
parent 66bd63336b
commit 3775d20e0c
17 changed files with 276 additions and 112 deletions

View File

@@ -4122,6 +4122,14 @@ void TDynamicObject::RenderSounds() {
sHeater.stop();
}
// battery sound
if( MoverParameters->Battery ) {
m_batterysound.play( sound_flags::exclusive | sound_flags::looping );
}
else {
m_batterysound.stop();
}
// brake system and braking sounds:
// brake cylinder piston
@@ -5763,6 +5771,12 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
sHeater.owner( this );
}
else if( token == "battery:" ) {
// train heating device
m_batterysound.deserialize( parser, sound_type::single );
m_batterysound.owner( this );
}
else if( token == "turbo:" ) {
// pliki z turbogeneratorem
m_powertrainsounds.engine_turbo.deserialize( parser, sound_type::multipart, sound_parameters::range );
@@ -6484,7 +6498,7 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
// other engine compartment sounds
auto const nullvector { glm::vec3() };
std::vector<sound_source *> enginesounds = {
&sConverter, &sCompressor, &sCompressorIdle, &sSmallCompressor, &sHeater
&sConverter, &sCompressor, &sCompressorIdle, &sSmallCompressor, &sHeater, &m_batterysound
};
for( auto sound : enginesounds ) {
if( sound->offset() == nullvector ) {