Fix a regression from 2008-12-23T02:44:00Z!cib123@googlemail.com by cib...

...which trampled part of 2008-08-05T21:59:10Z!shadowm@wesnoth.org and made endlevel music be
played even when skipping linger mode or using
result=continue/continue_no_save. Thanks Elvish_Pillager for
mentioning this on IRC.
This commit is contained in:
Ignacio R. Morelle 2009-03-01 15:28:18 +00:00
parent a1d6ed5941
commit 1c97fecbcc
2 changed files with 4 additions and 1 deletions

View file

@ -6,6 +6,9 @@ Version 1.5.11+svn:
* Language and i18n:
* updated translations: Chinese (Simplified), Czech, French, German, Italian,
Polish, Portuguese (Brazil), Spanish, Turkish
* Music and sound effects:
* Fix a regression which caused the endlevel music to be played even when
skipping linger mode (e.g. result=continue or continue_no_save).
* Miscellaneous and bug fixes:
* Removed last binaryWML references by making the save_index gzip
compressed. (We can still receive binaryWML via the network.)

View file

@ -398,7 +398,7 @@ LEVEL_RESULT playsingle_controller::play_scenario(const std::vector<config*>& st
// a victory, so let them use [music] tags
// instead should they want special music.
//
if(end_level.result == VICTORY && !obs) {
if(end_level.result == VICTORY && (!obs) && (end_level.linger_mode)) {
const std::string& victory_music = select_victory_music();
if(victory_music.empty() != true)
sound::play_music_once(victory_music);