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:
parent
9dd3bb9468
commit
8d0273ced0
@ -78,6 +78,7 @@ public:
|
||||
void loadMusicFromOneDir(const std::string& dir);
|
||||
void addMusicToTracks();
|
||||
|
||||
void clearCurrentMusic() { m_current_music = NULL; }
|
||||
};
|
||||
|
||||
extern MusicManager* music_manager;
|
||||
|
@ -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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user