Author: anonymissimus
Date: Mon Oct 24 00:56:54 2011
New Revision: 51600

URL: http://svn.gna.org/viewcvs/wesnoth?rev=51600&view=rev
Log:
set playsingle_controller::end_turn_ to false in linger mode (fix for bug 
#16821)

The problem was that this variable gets usually set to false during
the start of the side turns. If check_victory() ends the level between
the side turns, this initialization is missed so linger mode thinks
it has already been ended.
Other call cases of linger() should call the function with end_turn_==false
already. That is, I think they already do, since if not these would have
fallen into this bug category as well.

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

Modified: trunk/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=51600&r1=51599&r2=51600&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Mon Oct 24 00:56:54 2011
@@ -348,6 +348,7 @@
                        player_number_ = first_player_;
                        init_turn_data();
 
+                       end_turn_ = false;
                        play_human_turn();
                        turn_over_ = true;  // We don't want to linger mode to 
add end_turn to replay
                        after_human_turn();

Modified: trunk/src/playsingle_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=51600&r1=51599&r2=51600&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Mon Oct 24 00:56:54 2011
@@ -757,6 +757,7 @@
                // Same logic as single-player human turn, but
                // *not* the same as multiplayer human turn.
                gui_->enable_menu("endturn", true);
+               end_turn_ = false;
                while(!end_turn_) {
                        // Reset the team number to make sure we're the right 
team.
                        player_number_ = first_player_;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to