fix #2648: allow load turn in local multiplayer

this commit handles the load_game_exception thrown when the user presses
the button to load a specific turn.
This commit is contained in:
Goncalo Gomes 2023-09-12 16:03:39 +01:00 committed by Gunter Labes
parent a930b63903
commit f56fece450

View file

@ -968,7 +968,12 @@ bool game_launcher::play_multiplayer_commandline()
events::discard_input(); // prevent the "keylogger" effect
cursor::set(cursor::NORMAL);
mp::start_local_game_commandline(cmdline_opts_);
try {
mp::start_local_game_commandline(cmdline_opts_);
} catch(savegame::load_game_exception& e) {
load_data_ = std::move(e.data_);
return true;
}
return false;
}