diff --git a/src/gamestatus.cpp b/src/gamestatus.cpp index 4f17712858b..42c9f87b1e4 100644 --- a/src/gamestatus.cpp +++ b/src/gamestatus.cpp @@ -771,7 +771,6 @@ game_data* game_data::operator=(const game_data* info) game_classification::game_classification(): savegame_config(), label(), - parent(), version(), campaign_type(), campaign_define(), @@ -789,7 +788,6 @@ game_classification::game_classification(): game_classification::game_classification(const config& cfg): savegame_config(), label(cfg["label"]), - parent(cfg["parent"]), version(cfg["version"]), campaign_type(lexical_cast_default (cfg["campaign_type"].str(), game_classification::SCENARIO)), campaign_define(cfg["campaign_define"]), @@ -807,7 +805,6 @@ game_classification::game_classification(const config& cfg): game_classification::game_classification(const game_classification& gc): savegame_config(), label(gc.label), - parent(gc.parent), version(gc.version), campaign_type(gc.campaign_type), campaign_define(gc.campaign_define), @@ -828,7 +825,6 @@ config game_classification::to_config() const config cfg; cfg["label"] = label; - cfg["parent"] = parent; cfg["version"] = game_config::version; cfg["campaign_type"] = lexical_cast (campaign_type); cfg["campaign_define"] = campaign_define; @@ -1064,7 +1060,6 @@ void extract_summary_from_config(config& cfg_save, config& cfg_summary) cfg_summary["snapshot"] = has_snapshot; cfg_summary["label"] = cfg_save["label"]; - cfg_summary["parent"] = cfg_save["parent"]; cfg_summary["campaign_type"] = cfg_save["campaign_type"]; if(cfg_save.has_child("carryover_sides_start")){ diff --git a/src/gamestatus.hpp b/src/gamestatus.hpp index 02f19b78f6f..8ef7ffeffb5 100644 --- a/src/gamestatus.hpp +++ b/src/gamestatus.hpp @@ -226,7 +226,6 @@ public: config to_config() const; std::string label; /**< Name of the game (e.g. name of save file). */ - std::string parent; /**< Parent of the game (for save-threading purposes). */ std::string version; /**< Version game was created with. */ MAKE_ENUM (CAMPAIGN_TYPE, /**< Type of the game - campaign, multiplayer etc. */ (SCENARIO, "scenario") diff --git a/src/savegame.cpp b/src/savegame.cpp index 0ba8d6cf89a..72663dadaf1 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -883,7 +883,6 @@ void savegame::before_save() bool savegame::save_game(CVideo* video, const std::string& filename) { - static std::string parent, grandparent; try { Uint32 start, end; @@ -894,28 +893,12 @@ bool savegame::save_game(CVideo* video, const std::string& filename) before_save(); - // The magic moment that does save threading; after - // each save, the filename of the save file becomes - // the parent for the next. *Unless* the parent file - // has the same name as the savefile, in which case we - // use the grandparent name. When user loads a savegame, - // we load its correct parent link along with it. - if (filename_ == parent) { - gamestate_.classification().parent = grandparent; - } else { - gamestate_.classification().parent = parent; - } - LOG_SAVE << "Setting parent of '" << filename_<< "' to " << gamestate_.classification().parent << std::endl; - write_game_to_disk(filename_); if (resources::persist != NULL) { resources::persist->end_transaction(); resources::persist ->start_transaction(); } - grandparent = parent; - parent = filename_; - end = SDL_GetTicks(); LOG_SAVE << "Milliseconds to save " << filename_ << ": " << end - start << std::endl;