diff --git a/src/game_classification.cpp b/src/game_classification.cpp index 297da7e8830..2d20d6d7216 100644 --- a/src/game_classification.cpp +++ b/src/game_classification.cpp @@ -39,7 +39,6 @@ game_classification::game_classification(): mod_defines(), campaign(), abbrev(), - completion(), end_credits(true), end_text(), end_text_duration(), @@ -60,7 +59,6 @@ game_classification::game_classification(const config& cfg): mod_defines(utils::split(cfg["mod_defines"])), campaign(cfg["campaign"]), abbrev(cfg["abbrev"]), - completion(cfg["completion"]), end_credits(cfg["end_credits"].to_bool(true)), end_text(cfg["end_text"]), end_text_duration(cfg["end_text_duration"]), @@ -81,7 +79,6 @@ game_classification::game_classification(const game_classification& gc): mod_defines(gc.mod_defines), campaign(gc.campaign), abbrev(gc.abbrev), - completion(gc.completion), end_credits(gc.end_credits), end_text(gc.end_text), end_text_duration(gc.end_text_duration), @@ -105,7 +102,6 @@ config game_classification::to_config() const cfg["mod_defines"] = utils::join(mod_defines); cfg["campaign"] = campaign; cfg["abbrev"] = abbrev; - cfg["completion"] = completion; cfg["end_credits"] = end_credits; cfg["end_text"] = end_text; cfg["end_text_duration"] = str_cast(end_text_duration); diff --git a/src/game_classification.hpp b/src/game_classification.hpp index 98273040096..0a3f8b41db1 100644 --- a/src/game_classification.hpp +++ b/src/game_classification.hpp @@ -50,8 +50,6 @@ public: std::string campaign; /**< the campaign being played */ std::string abbrev; /**< the campaign abbreviation */ -// std::string scenario; /**< the scenario being played */ - std::string completion; /**< running. victory, or defeat */ bool end_credits; /**< whether to show the standard credits at the end */ std::string end_text; /**< end-of-campaign text */ unsigned int end_text_duration; /**< for how long the end-of-campaign text is shown */ diff --git a/src/playmp_controller.cpp b/src/playmp_controller.cpp index fd53c1abe03..0bf16921ab1 100644 --- a/src/playmp_controller.cpp +++ b/src/playmp_controller.cpp @@ -262,10 +262,6 @@ void playmp_controller::linger() // If we need to set the status depending on the completion state // we're needed here. gui_->set_game_mode(game_display::LINGER_MP); - - // 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. - set_completion setter(saved_game_,"running"); // End all unit moves gamestate_.board_.set_all_units_user_end_turn(); diff --git a/src/playsingle_controller.cpp b/src/playsingle_controller.cpp index f811e25c5d2..9abfe2f3bd3 100644 --- a/src/playsingle_controller.cpp +++ b/src/playsingle_controller.cpp @@ -397,7 +397,6 @@ LEVEL_RESULT playsingle_controller::play_scenario( } return VICTORY; } - saved_game_.classification().completion = is_victory ? "victory" : "defeat"; if(is_observer()) { gui2::show_transient_message(gui_->video(), _("Game Over"), _("The game is over.")); return OBSERVER_END; @@ -409,12 +408,11 @@ LEVEL_RESULT playsingle_controller::play_scenario( config& info = cfg.add_child("info"); info["type"] = "termination"; info["condition"] = "game over"; - info["result"] = saved_game_.classification().completion; + info["result"] = is_victory ? "victory" : "defeat"; network::send_data(cfg, 0); } if (!is_victory) { - saved_game_.classification().completion = "defeat"; pump().fire("defeat"); const std::string& defeat_music = select_defeat_music(); @@ -425,7 +423,6 @@ LEVEL_RESULT playsingle_controller::play_scenario( } else { - saved_game_.classification().completion = !end_level.transient.linger_mode ? "running" : "victory"; pump().fire("victory"); // @@ -723,11 +720,6 @@ void playsingle_controller::linger() // the key to it is here. gui_->set_game_mode(game_display::LINGER_SP); - // 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. - set_completion setter(saved_game_,"running"); - // change the end-turn button text to its alternate label gui_->get_theme().refresh_title2("button-endturn", "title2"); gui_->invalidate_theme(); diff --git a/src/playsingle_controller.hpp b/src/playsingle_controller.hpp index 9ba13519520..04ab876ac34 100644 --- a/src/playsingle_controller.hpp +++ b/src/playsingle_controller.hpp @@ -25,21 +25,6 @@ #include "saved_game.hpp" class team; -struct set_completion -{ - set_completion(saved_game& state, const std::string& completion) : - state_(state), completion_(completion) - { - } - ~set_completion() - { - state_.classification().completion = completion_; - } - private: - saved_game& state_; - const std::string completion_; -}; - class playsingle_controller : public play_controller { public: