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

sound loundness fixes in compat mode

This commit is contained in:
milek7
2017-09-12 18:00:39 +02:00
parent 8f06dbed39
commit dda0cf9c8e
2 changed files with 16 additions and 8 deletions

View File

@@ -4062,16 +4062,24 @@ bool TTrain::Update( double const Deltatime )
} }
else else
{ {
if( dsbRelay != nullptr ) { dsbRelay->gain(0.5f); } if( dsbRelay != nullptr ) { dsbRelay->gain(Global::soundgainmode == Global::compat ? 0.9f : 0.5f); }
} }
if (!TestFlag(mvOccupied->SoundFlag, sound_manyrelay)) if (!TestFlag(mvOccupied->SoundFlag, sound_manyrelay))
dsbRelay->play(); {
if (dsbRelay) dsbRelay->play();
}
else else
{ {
if (TestFlag(mvOccupied->SoundFlag, sound_loud)) if (TestFlag(mvOccupied->SoundFlag, sound_loud))
dsbWejscie_na_bezoporow->play(); {
if (dsbWejscie_na_bezoporow)
dsbWejscie_na_bezoporow->play();
}
else else
dsbWejscie_na_drugi_uklad->play(); {
if (dsbWejscie_na_drugi_uklad)
dsbWejscie_na_drugi_uklad->play();
}
} }
} }
@@ -4081,7 +4089,7 @@ bool TTrain::Update( double const Deltatime )
if( TestFlag( mvOccupied->SoundFlag, sound_loud ) ) if( TestFlag( mvOccupied->SoundFlag, sound_loud ) )
dsbBufferClamp->gain(1.0f); dsbBufferClamp->gain(1.0f);
else else
dsbBufferClamp->gain(0.5f); dsbBufferClamp->gain(Global::soundgainmode == Global::compat ? 0.9f : 0.5f);
dsbBufferClamp->play(); dsbBufferClamp->play();
} }
} }
@@ -4091,7 +4099,7 @@ bool TTrain::Update( double const Deltatime )
if (TestFlag(mvOccupied->SoundFlag, sound_loud)) if (TestFlag(mvOccupied->SoundFlag, sound_loud))
dsbCouplerStretch->gain(1.0f); dsbCouplerStretch->gain(1.0f);
else else
dsbCouplerStretch->gain(0.5f); dsbCouplerStretch->gain(Global::soundgainmode == Global::compat ? 0.9f : 0.5f);
dsbCouplerStretch->play(); dsbCouplerStretch->play();
} }

View File

@@ -741,7 +741,7 @@ void TWorld::OnKeyDown(int cKey)
if (temp->MoverParameters->IncLocalBrakeLevelFAST()) if (temp->MoverParameters->IncLocalBrakeLevelFAST())
if (Train) if (Train)
{ // dźwięk oczywiście jest w kabinie { // dźwięk oczywiście jest w kabinie
Train->dsbPneumaticRelay->gain(0.5f).play(); Train->dsbPneumaticRelay->gain(Global::soundgainmode == Global::compat ? 0.9f : 0.5f).play();
} }
} }
} }
@@ -760,7 +760,7 @@ void TWorld::OnKeyDown(int cKey)
if (temp->MoverParameters->DecLocalBrakeLevelFAST()) if (temp->MoverParameters->DecLocalBrakeLevelFAST())
if (Train) if (Train)
{ // dźwięk oczywiście jest w kabinie { // dźwięk oczywiście jest w kabinie
Train->dsbPneumaticRelay->gain(0.5f).play(); Train->dsbPneumaticRelay->gain(Global::soundgainmode == Global::compat ? 0.9f : 0.5f).play();
} }
} }
} }