Only play start and lap fanfares if music is enabled
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7771 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
04adf0bf63
commit
589abb4333
@ -293,14 +293,22 @@ void LinearWorld::newLap(unsigned int kart_index)
|
||||
3.0f, 40, video::SColor(255, 210, 100, 50), true);
|
||||
if(!m_last_lap_sfx_played && lap_count > 1)
|
||||
{
|
||||
m_last_lap_sfx->play();
|
||||
m_last_lap_sfx_played = true;
|
||||
m_last_lap_sfx_playing = true;
|
||||
|
||||
// In case that no music is defined
|
||||
if(music_manager->getCurrentMusic() && music_manager->getMasterMusicVolume() > 0.2f)
|
||||
if (UserConfigParams::m_music)
|
||||
{
|
||||
music_manager->getCurrentMusic()->setTemporaryVolume(0.2f);
|
||||
m_last_lap_sfx->play();
|
||||
m_last_lap_sfx_played = true;
|
||||
m_last_lap_sfx_playing = true;
|
||||
|
||||
// In case that no music is defined
|
||||
if(music_manager->getCurrentMusic() && music_manager->getMasterMusicVolume() > 0.2f)
|
||||
{
|
||||
music_manager->getCurrentMusic()->setTemporaryVolume(0.2f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_last_lap_sfx_played = true;
|
||||
m_last_lap_sfx_playing = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,8 @@ void WorldStatus::update(const float dt)
|
||||
case SETUP_PHASE:
|
||||
m_auxiliary_timer = 0.0f;
|
||||
m_phase = TRACK_INTRO_PHASE;
|
||||
m_track_intro_sound->play();
|
||||
if (UserConfigParams::m_music)
|
||||
m_track_intro_sound->play();
|
||||
return;
|
||||
case TRACK_INTRO_PHASE:
|
||||
if(m_track_intro_sound->getStatus()==SFXManager::SFX_PLAYING)
|
||||
|
Loading…
Reference in New Issue
Block a user