diff --git a/src/game.cpp b/src/game.cpp index 75e6e429dc31..b8771937b894 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -470,11 +470,13 @@ void game::reenter_fullscreen() /* * Initialize more stuff after mapbuffer is loaded. */ -void game::setup() +void game::setup( bool load_world_modfiles ) { loading_ui ui( true ); - init::load_world_modfiles( ui, get_active_world(), SAVE_ARTIFACTS ); + if( load_world_modfiles ) { + init::load_world_modfiles( ui, get_active_world(), SAVE_ARTIFACTS ); + } m = map(); @@ -2392,8 +2394,9 @@ bool game::is_game_over() if( u.is_dead_state() ) { if( get_option( "PROMPT_ON_CHARACTER_DEATH" ) && !query_yn( - _( "Your character is dead, do you accept this?\n\nSelect Yes to abandon the character to their fate, select No to return to main menu." ) ) ) { - return true; + _( "Your character is dead, do you accept this?\n\nSelect Yes to abandon the character to their fate, select No to try again." ) ) ) { + g->quickload(); + return false; } Messages::deactivate(); @@ -2539,8 +2542,6 @@ bool game::load( const save_t &name ) background_pane background; static_popup popup; popup.message( "%s", _( "Please wait…\nLoading the save…" ) ); - ui_manager::redraw(); - refresh_display(); using namespace std::placeholders; @@ -2554,7 +2555,9 @@ bool game::load( const save_t &name ) std::bind( &game::unserialize, this, _1 ) ) ) { return false; } - + // This needs to be here for some reason for quickload() to work + ui_manager::redraw(); + refresh_display(); u.load_map_memory(); u.get_avatar_diary()->load(); @@ -11424,16 +11427,15 @@ void game::quickload() } if( active_world->info->save_exists( save_t::from_save_id( u.get_save_id() ) ) ) { - if( moves_since_last_save != 0 ) { // See if we need to reload anything - MAPBUFFER.clear(); - overmap_buffer.clear(); - try { - setup(); - } catch( const std::exception &err ) { - debugmsg( "Error: %s", err.what() ); - } - load( save_t::from_save_id( u.get_save_id() ) ); - } + MAPBUFFER.clear(); + overmap_buffer.clear(); + try { + // Doesn't need to load mod files again for the same world + setup( false ); + } catch( const std::exception &err ) { + debugmsg( "Error: %s", err.what() ); + } + load( save_t::from_save_id( u.get_save_id() ) ); } else { popup_getkey( _( "No saves for current character yet." ) ); } diff --git a/src/game.h b/src/game.h index d136efca5d74..162cb20ea880 100644 --- a/src/game.h +++ b/src/game.h @@ -167,7 +167,7 @@ class game void on_options_changed(); public: - void setup(); + void setup( bool load_world_modfiles = true ); /** Saving and loading functions. */ void serialize( std::ostream &fout ); // for save void unserialize( std::istream &fin ); // for load diff --git a/src/options.cpp b/src/options.cpp index 9a81d25de8c5..a9c79bf1a03c 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -1222,7 +1222,7 @@ void options_manager::add_options_general() }; add( "PROMPT_ON_CHARACTER_DEATH", general, translate_marker( "Prompt on character death" ), - translate_marker( "If enabled, when your character dies, the player is given a prompt that gives the option to cancel savefile deletion and other death effects, returning to the main menu without saving instead." ), + translate_marker( "If enabled, when your character dies, the player is given a prompt that gives the option to reload the last saved game instead of dying." ), false );