Allow cutscenes to have no music, a few minor other fixes in animation

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11315 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-06-17 00:13:33 +00:00
parent 9dd3bb9468
commit 8d0273ced0
2 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,7 @@ public:
void loadMusicFromOneDir(const std::string& dir);
void addMusicToTracks();
void clearCurrentMusic() { m_current_music = NULL; }
};
extern MusicManager* music_manager;

View File

@ -390,6 +390,8 @@ void Track::startMusic() const
// In case that the music wasn't found (a warning was already printed)
if(m_music.size()>0)
music_manager->startMusic(m_music[rand()% m_music.size()], false);
else
music_manager->clearCurrentMusic();
} // startMusic
//-----------------------------------------------------------------------------