bool loadgame::load_multiplayer_game() { show_dialog(false, false); if (filename_.empty()) return false; std::string error_log; { cursor::setter cur(cursor::WAIT); log_scope("load_game"); read_save_file(filename_, load_config_, &error_log); copy_era(load_config_); gamestate_.set_data(load_config_); } if(!error_log.empty()) { gui2::show_error_message(gui_.video(), _("The file you have tried to load is corrupt: '") + error_log); return false; } if(gamestate_.classification().campaign_type != game_classification::CAMPAIGN_TYPE::MULTIPLAYER) { gui2::show_transient_error_message(gui_.video(), _("This is not a multiplayer save.")); return false; } return check_version_compatibility(); }
void loadgame::load_multiplayer_game() { show_dialog(false, false); if (filename_.empty()) throw load_game_cancelled_exception(); std::string error_log; { cursor::setter cur(cursor::WAIT); log_scope("load_game"); manager::read_save_file(filename_, load_config_, &error_log); copy_era(load_config_); gamestate_ = game_state(load_config_); } if(!error_log.empty()) { gui2::show_error_message(gui_.video(), _("The file you have tried to load is corrupt: '") + error_log); throw load_game_cancelled_exception(); } if(gamestate_.classification().campaign_type != "multiplayer") { gui2::show_message(gui_.video(), "", _("This is not a multiplayer save")); throw load_game_cancelled_exception(); } check_version_compatibility(); }