diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 95378c86..da6ac426 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -1146,6 +1146,7 @@ void CRobotMain::ChangePhase(Phase phase) if (m_phase == PHASE_WIN) { + m_sound->StopAll(); if (m_endingWinRank == -1) { ChangePhase(PHASE_TERM); @@ -1192,13 +1193,13 @@ void CRobotMain::ChangePhase(Phase phase) { m_displayText->DisplayError(INFO_WIN, Math::Vector(0.0f,0.0f,0.0f), 15.0f, 60.0f, 1000.0f); } + StartMusic(); } - m_sound->StopAll(); - StartMusic(); } if (m_phase == PHASE_LOST) { + m_sound->StopAll(); if (m_endingLostRank == -1) { ChangePhase(PHASE_TERM); @@ -1215,9 +1216,9 @@ void CRobotMain::ChangePhase(Phase phase) ddim.x = dim.x*2; ddim.y = dim.y*2; m_interface->CreateButton(pos, ddim, 16, EVENT_BUTTON_OK); m_displayText->DisplayError(INFO_LOST, Math::Vector(0.0f,0.0f,0.0f), 15.0f, 60.0f, 1000.0f); + + StartMusic(); } - m_sound->StopAll(); - StartMusic(); } if (m_phase == PHASE_LOADING) diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index fede0b79..a0b0e06f 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -745,6 +745,10 @@ pb->SetState(STATE_SHADOW); m_phase == PHASE_USER || m_phase == PHASE_PROTO ) { + if (!m_sound->IsPlayingMusic()) { + m_sound->PlayMusic(11, true); + } + if ( m_phase == PHASE_TRAINER ) m_index = 0; if ( m_phase == PHASE_DEFI ) m_index = 1; if ( m_phase == PHASE_MISSION ) m_index = 2;