Removed redundant calls to game_launcher::clear_loaded_game

Calling game_launcher::load_game already cleared the loaded data if present unconditionally.
This commit is contained in:
Charles Dang 2021-01-05 23:37:06 +11:00
parent d9680a906c
commit 5242fa370a
2 changed files with 1 additions and 6 deletions

View File

@ -340,8 +340,6 @@ void title_screen::pre_show(window& win)
register_button(win, "load", hotkey::HOTKEY_LOAD_GAME, [this, &win]() {
if(game_.load_game()) {
win.set_retval(LAUNCH_GAME);
} else {
game_.clear_loaded_game();
}
});

View File

@ -884,10 +884,7 @@ static int do_gameloop(const std::vector<std::string>& args)
// If loading a game, skip the titlescreen entirely
if(game->is_loading()) {
if(!game->load_game()) {
game->clear_loaded_game();
}
game->load_game();
game->launch_game(should_reload);
continue;
}