mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 07:59:18 +02:00
Merge remote-tracking branch 'TMJ/master'
This commit is contained in:
24
DynObj.cpp
24
DynObj.cpp
@@ -4210,7 +4210,7 @@ void TDynamicObject::RenderSounds() {
|
||||
}
|
||||
|
||||
// Dzwiek odluzniacza
|
||||
if( MoverParameters->Hamulec->GetStatus() & b_rls ) {
|
||||
if( MoverParameters->Hamulec->Releaser() ) {
|
||||
sReleaser
|
||||
.gain(
|
||||
clamp<float>(
|
||||
@@ -4295,6 +4295,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 ) {
|
||||
@@ -5703,6 +5716,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