Make sure there is music when winning a GP, fixes #2296

This commit is contained in:
Marianne Gagnon
2015-08-31 19:33:05 -04:00
parent 0a1053b3e4
commit 90b95c7fb5
2 changed files with 11 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include "states_screens/grand_prix_win.hpp"
#include "audio/music_manager.hpp"
#include "audio/sfx_manager.hpp"
#include "challenges/unlock_manager.hpp"
#include "config/player_manager.hpp"
@@ -347,3 +348,12 @@ void GrandPrixWin::setKarts(const std::string idents_arg[3])
} // setKarts
// -------------------------------------------------------------------------------------
MusicInformation* GrandPrixWin::getInGameMenuMusic() const
{
MusicInformation* mi = music_manager->getMusicInformation("win_theme.music");
return mi;
}
// -------------------------------------------------------------------------------------

View File

@@ -66,6 +66,7 @@ public:
void loadedFromFile() OVERRIDE {};
void onCutsceneEnd() OVERRIDE;
void onUpdate(float dt) OVERRIDE;
MusicInformation* getInGameMenuMusic() const OVERRIDE;
/** \pre must be called after pushing the screen, but before onUpdate had the chance to be invoked */
void setKarts(const std::string idents[3]);