Close bug #5852 ([music] tag in scenario ignored after music= in intro)
Seems to have been lost in the jhinrichs merge (and anyway, scenario music needs to be played *after* intro music).
This commit is contained in:
parent
025c9b619e
commit
773ab7f603
2 changed files with 8 additions and 5 deletions
|
@ -96,11 +96,6 @@ void play_controller::init(CVideo& video){
|
|||
|
||||
LOG_NG << "start music... " << (SDL_GetTicks() - ticks_) << "\n";
|
||||
|
||||
const std::string& music = level_["music"];
|
||||
if(music != "") {
|
||||
sound::play_music_repeatedly(music);
|
||||
}
|
||||
|
||||
//find a list of 'items' (i.e. overlays) on the level, and add them
|
||||
const config::child_list& overlays = level_.get_children("item");
|
||||
for(config::child_list::const_iterator overlay = overlays.begin(); overlay != overlays.end(); ++overlay) {
|
||||
|
|
|
@ -147,6 +147,14 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
|
|||
|
||||
replaying_ = (recorder.at_end() == false);
|
||||
|
||||
// Start music (intro music might be playing already).
|
||||
const config::child_list& m = level_.get_children("music");
|
||||
config::const_child_iterator i;
|
||||
for (i = m.begin(); i != m.end(); i++) {
|
||||
sound::play_music_config(**i);
|
||||
}
|
||||
sound::commit_music_changes();
|
||||
|
||||
LOG_NG << "starting main loop\n" << (SDL_GetTicks() - ticks_) << "\n";
|
||||
|
||||
// Initialize countdown clock.
|
||||
|
|
Loading…
Add table
Reference in a new issue