mail[Wesnoth-commits] r52545 - in /trunk: changelog src/playsingle_controller.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by shadowm2006 on January 08, 2012 - 14:35:
Author: shadowmaster
Date: Sun Jan  8 14:35:47 2012
New Revision: 52545

URL: http://svn.gna.org/viewcvs/wesnoth?rev=52545&view=rev
Log:
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.

Modified:
    trunk/changelog
    trunk/src/playsingle_controller.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=52545&r1=52544&r2=52545&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Jan  8 14:35:47 2012
@@ -23,6 +23,8 @@
    * 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*

Modified: trunk/src/playsingle_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=52545&r1=52544&r2=52545&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Sun Jan  8 14:35:47 2012
@@ -676,12 +676,12 @@
 
        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);
        }
 }




Related Messages


Powered by MHonArc, Updated Sun Jan 08 18:20:06 2012