block 'Back To..' in Mp in linger mode fixes #4236

This commit is contained in:
gfgtdf 2023-03-21 19:13:05 +01:00
parent d483070ddb
commit 7fe5d09745
2 changed files with 5 additions and 0 deletions

View file

@ -258,6 +258,7 @@ bool play_controller::hotkey_handler::do_execute_command(const hotkey::hotkey_co
if(i < savenames_.size() && !savenames_[i].empty()) {
// Load the game by throwing load_game_exception
load_autosave(savenames_[i]);
return true;
} else if ( i < wml_commands_.size() && wml_commands_[i] ) {
wml_commands_[i]->fire_event(mouse_handler_.get_last_hex(), gamestate().gamedata_);

View file

@ -308,6 +308,10 @@ void playsingle_controller::hotkey_handler::load_autosave(const std::string& fil
{
if(playsingle_controller_.is_networked_mp())
{
if(linger() ) {
//This doesn't work in linger mode.
return;
}
config savegame;
std::string error_log;
savegame::read_save_file(filesystem::get_saves_dir(), filename, savegame, &error_log);