Don't pause music on overworld when opening challenge dialog

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12046 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-11-22 01:07:09 +00:00
parent 78c4cb04eb
commit 570546e5cb
3 changed files with 9 additions and 2 deletions

View File

@ -77,6 +77,7 @@ void OverWorld::enterOverWorld()
OverWorld::OverWorld() : LinearWorld()
{
m_return_to_garage = false;
m_stop_music_when_dialog_open = false;
}
// ----------------------------------------------------------------------------

View File

@ -95,6 +95,8 @@ World::World() : WorldStatus(), m_clear_color(255,100,101,140)
m_schedule_unpause = false;
m_self_destruct = false;
m_stop_music_when_dialog_open = true;
WorldStatus::setClockMode(CLOCK_CHRONO);
} // World
@ -946,7 +948,8 @@ void World::restartRace()
*/
void World::pause(Phase phase)
{
music_manager->pauseMusic();
if (m_stop_music_when_dialog_open)
music_manager->pauseMusic();
sfx_manager->pauseAll();
WorldStatus::pause(phase);
@ -955,7 +958,8 @@ void World::pause(Phase phase)
//-----------------------------------------------------------------------------
void World::unpause()
{
music_manager->resumeMusic() ;
if (m_stop_music_when_dialog_open)
music_manager->resumeMusic();
sfx_manager->resumeAll();
WorldStatus::unpause();

View File

@ -87,6 +87,8 @@ protected:
bool m_faster_music_active; // true if faster music was activated
bool m_stop_music_when_dialog_open;
/** Whether highscores should be used for this kind of race.
* True by default, change to false in a child class to disable.
*/