fix SoundVolume and SoundVolumeAttract
This commit is contained in:
@@ -28,7 +28,7 @@ ScreenAttract::ScreenAttract( bool bResetGameState )
|
||||
void ScreenAttract::BeginScreen()
|
||||
{
|
||||
GAMESTATE->VisitAttractScreen( m_sName );
|
||||
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
|
||||
ScreenAttract::SetAttractVolume( true );
|
||||
|
||||
ScreenWithMenuElements::BeginScreen();
|
||||
}
|
||||
@@ -43,9 +43,16 @@ void ScreenAttract::Input( const InputEventPlus &input )
|
||||
void ScreenAttract::SetAttractVolume( bool bInAttract )
|
||||
{
|
||||
if( bInAttract )
|
||||
SOUNDMAN->SetVolumeOfNonCriticalSounds( 0.0f ); // mute attract sounds
|
||||
{
|
||||
if( GAMESTATE->IsTimeToPlayAttractSounds() )
|
||||
SOUNDMAN->SetVolumeOfNonCriticalSounds( g_fSoundVolumeAttract ); // unmute attract sounds
|
||||
else
|
||||
SOUNDMAN->SetVolumeOfNonCriticalSounds( 0.0f ); // mute attract sounds
|
||||
}
|
||||
else
|
||||
SOUNDMAN->SetVolumeOfNonCriticalSounds( g_fSoundVolumeAttract ); // unmute attract sounds
|
||||
{
|
||||
SOUNDMAN->SetVolumeOfNonCriticalSounds( 1.0f ); // unmute all sounds
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenAttract::AttractInput( const InputEventPlus &input, ScreenWithMenuElements *pScreen )
|
||||
|
||||
@@ -25,7 +25,7 @@ void ScreenDemonstration::Init()
|
||||
{
|
||||
GAMESTATE->Reset();
|
||||
GAMESTATE->VisitAttractScreen( m_sName );
|
||||
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
|
||||
ScreenAttract::SetAttractVolume( true );
|
||||
|
||||
// Choose a Style
|
||||
{
|
||||
|
||||
@@ -715,8 +715,8 @@ static void InitializeConfOptions()
|
||||
/* Sound options */
|
||||
ADD( ConfOption( "AttractSoundFrequency", MovePref<AttractSoundFrequency>, "Never","Always","2 Times","3 Times","4 Times","5 Times" ) );
|
||||
ADD( ConfOption( "SoundVolume", SoundVolume, "Silent","|10%","|20%","|30%","|40%","|50%","|60%","|70%","|80%","|90%","|100%" ) );
|
||||
ADD( ConfOption( "SoundVolumeAttract", SoundVolumeAttract, "Silent","|10%","|20%","|30%","|40%","|50%","|60%","|70%","|80%","|90%","|100%" ) );
|
||||
g_ConfOptions.back().m_iEffects = OPT_APPLY_SOUND;
|
||||
ADD( ConfOption( "SoundVolumeAttract", SoundVolumeAttract, "Silent","|10%","|20%","|30%","|40%","|50%","|60%","|70%","|80%","|90%","|100%" ) );
|
||||
{
|
||||
ConfOption c( "GlobalOffsetSeconds", GlobalOffsetSeconds );
|
||||
for( int i = -100; i <= +100; i += 5 )
|
||||
|
||||
Reference in New Issue
Block a user