Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jun 1, 2014
2 parents 064dcc3 + 7828466 commit 3da7515
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
5 changes: 5 additions & 0 deletions changelog
Expand Up @@ -211,6 +211,11 @@ Version 1.11.11:
* Linux dbus notifications: Only last 5 messages are remembered, and they
are displayed with the most recent ones first.
* Fixed bug #21736: MP create screen always defaulting to top entry.
* Fix bug #21397: "Saving and loading may cause a side's turn is not
initialized".
* Fix bug which caused no units to be displayed when reloading an end of
scenario save, by stripping them from the save file. However, this does
not fix bug #15545, which was the reason that this behavior was introduced.

Version 1.11.10:
* Add-ons client:
Expand Down
2 changes: 1 addition & 1 deletion src/playmp_controller.cpp
Expand Up @@ -311,7 +311,7 @@ void playmp_controller::linger()

// this is actually for after linger mode is over -- we don't want to
// stay stuck in linger state when the *next* scenario is over.
gamestate_.classification().completion = "running";
set_completion setter(gamestate_,"running");
// End all unit moves
BOOST_FOREACH(unit &u, units_) {
u.set_user_end_turn(true);
Expand Down
14 changes: 0 additions & 14 deletions src/playsingle_controller.cpp
Expand Up @@ -811,20 +811,6 @@ void playsingle_controller::play_human_turn() {
gui_->draw();
}
}
struct set_completion
{
set_completion(game_state& state, const std::string& completion) :
state_(state), completion_(completion)
{
}
~set_completion()
{
state_.classification().completion = completion_;
}
private:
game_state& state_;
const std::string completion_;
};

void playsingle_controller::linger()
{
Expand Down
15 changes: 15 additions & 0 deletions src/playsingle_controller.hpp
Expand Up @@ -21,6 +21,21 @@
#include "playturn.hpp"
#include "replay.hpp"

struct set_completion
{
set_completion(game_state& state, const std::string& completion) :
state_(state), completion_(completion)
{
}
~set_completion()
{
state_.classification().completion = completion_;
}
private:
game_state& state_;
const std::string completion_;
};

class playsingle_controller : public play_controller
{
public:
Expand Down

0 comments on commit 3da7515

Please sign in to comment.