Make sure to not call the turn bell or autosaves code...
...after [endlevel] has been issued I believe this only occurred in one border case involving an earlier [end_turn] action (in the add-on After the Storm, E1S6 part 1, to be specific), but since the turn dialog already checks whether level_result_ has changed before displaying, it seems okay to do the same for this code as well. This doesn't affect autosave deletion.
This commit is contained in:
parent
bfb3952e2b
commit
969760e7e1
2 changed files with 4 additions and 2 deletions
|
@ -23,6 +23,8 @@ Version 1.9.13+svn:
|
|||
* Made empty {} preprocessor directives be handled more gracefully
|
||||
(bug #19233)
|
||||
* Fixed bug #19213: [harm_unit] incorrectly uses ToD bonus
|
||||
* The turn bell and autosaves are not triggered anymore in certain situations
|
||||
after [endlevel] has been issued
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fixed bug #19032: Poison and level up AI defense placement calculation
|
||||
* Fixed bug #19245: wesnoth(6) man page doesn't describe the --campaign*
|
||||
|
|
|
@ -676,12 +676,12 @@ void playsingle_controller::before_human_turn(bool save)
|
|||
|
||||
ai::manager::raise_turn_started();
|
||||
|
||||
if (save) {
|
||||
if(save && level_result_ == NONE) {
|
||||
savegame::autosave_savegame save(gamestate_, *gui_, to_config(), preferences::compress_saves());
|
||||
save.autosave(game_config::disable_autosave, preferences::autosavemax(), preferences::INFINITE_AUTO_SAVES);
|
||||
}
|
||||
|
||||
if(preferences::turn_bell()) {
|
||||
if(preferences::turn_bell() && level_result_ == NONE) {
|
||||
sound::play_bell(game_config::sounds::turn_bell);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue