sound: Report missing tracks early in play_music_config() (bug #21479)

This makes it so play_once=yes tracks are caught in the check too.
This commit is contained in:
Ignacio R. Morelle 2014-01-14 01:30:35 -03:00
parent da2ac22e28
commit d110cd16d8
2 changed files with 6 additions and 3 deletions

View File

@ -24,6 +24,8 @@ Version 1.11.8+dev:
* Fixed broken image references in the Gameplay -> Time of Day help topic.
* The internal variables used by the LIMIT_RECRUITS WML macro are now
cleared on victory.
* Fixed missing log error message for invalid music tracks set with
play_once=yes (bug #21479).
Version 1.11.8:
* Add-ons client:

View File

@ -525,6 +525,10 @@ void play_music_config(const config &music_node)
{
music_track track( music_node );
if (!track.valid() && !track.id().empty()) {
ERR_AUDIO << "cannot open track '" << track.id() << "'; disabled in this playlist.\n";
}
// If they say play once, we don't alter playlist.
if (track.play_once()) {
current_track = track;
@ -553,9 +557,6 @@ void play_music_config(const config &music_node)
ERR_AUDIO << "tried to add duplicate track '" << track.file_path() << "'\n";
}
}
else if(track.id().empty() == false) {
ERR_AUDIO << "cannot open track '" << track.id() << "'; disabled in this playlist.\n";
}
// They can tell us to start playing this list immediately.
if (track.immediate()) {