mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
build 210508. spring brake sound support, internaldata sounds update fix, minor bug fixes
This commit is contained in:
24
DynObj.cpp
24
DynObj.cpp
@@ -4209,7 +4209,7 @@ void TDynamicObject::RenderSounds() {
|
||||
}
|
||||
|
||||
// Dzwiek odluzniacza
|
||||
if( MoverParameters->Hamulec->GetStatus() & b_rls ) {
|
||||
if( MoverParameters->Hamulec->Releaser() ) {
|
||||
sReleaser
|
||||
.gain(
|
||||
clamp<float>(
|
||||
@@ -4294,6 +4294,19 @@ void TDynamicObject::RenderSounds() {
|
||||
rsPisk.stop();
|
||||
}
|
||||
|
||||
// spring brake
|
||||
if( m_springbrakesounds.state != MoverParameters->SpringBrake.Activate ) {
|
||||
m_springbrakesounds.state = MoverParameters->SpringBrake.Activate;
|
||||
if( m_springbrakesounds.state ) {
|
||||
m_springbrakesounds.activate.play( sound_flags::exclusive );
|
||||
m_springbrakesounds.release.stop();
|
||||
}
|
||||
else {
|
||||
m_springbrakesounds.activate.stop();
|
||||
m_springbrakesounds.release.play( sound_flags::exclusive );
|
||||
}
|
||||
}
|
||||
|
||||
// other sounds
|
||||
// load exchange
|
||||
if( MoverParameters->LoadStatus & 1 ) {
|
||||
@@ -5702,6 +5715,15 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co
|
||||
rsUnbrake.deserialize( parser, sound_type::single, sound_parameters::range );
|
||||
rsUnbrake.owner( this );
|
||||
}
|
||||
// spring brake sounds
|
||||
else if( token == "springbrake:" ) {
|
||||
m_springbrakesounds.activate.deserialize( parser, sound_type::single );
|
||||
m_springbrakesounds.activate.owner( this );
|
||||
}
|
||||
else if( token == "springbrakeoff:" ) {
|
||||
m_springbrakesounds.release.deserialize( parser, sound_type::single );
|
||||
m_springbrakesounds.release.owner( this );
|
||||
}
|
||||
|
||||
else if( token == "derail:" ) {
|
||||
// dzwiek przy wykolejeniu
|
||||
|
||||
Reference in New Issue
Block a user