diff options
author | Bardur Arantsson <bardur@scientician.net> | 2011-03-31 01:18:50 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 19:53:56 +0200 |
commit | f9c459680ef61af4387edb352b899c43399698c6 (patch) | |
tree | c9cbd16c856facc7372374004f15c18ec7683953 /src/files.c | |
parent | f4b63ea835e9deafa2fb60270c6b53f8a3698256 (diff) |
Files: Remove panic saves.
It is NOT a good idea to save the game when memory may already be
corrupted.
Diffstat (limited to 'src/files.c')
-rw-r--r-- | src/files.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/files.c b/src/files.c index 43ff614e..6cbb5a8a 100644 --- a/src/files.c +++ b/src/files.c @@ -4354,8 +4354,6 @@ void remove_cave_view(bool_ remove) */ void do_cmd_save_game(void) { - panic_save = 0; /* Fixes an apparently long-lived bug */ - remove_cave_view(TRUE); /* Save the current level if in a persistent level */ @@ -5896,49 +5894,6 @@ void close_game(void) /* - * Handle abrupt death of the visual system - * - * This routine is called only in very rare situations, and only - * by certain visual systems, when they experience fatal errors. - * - * XXX XXX Hack -- clear the death flag when creating a HANGUP - * save file so that player can see tombstone when restart. - */ -void exit_game_panic(void) -{ - /* If nothing important has happened, just quit */ - if (!character_generated || character_saved) quit("panic"); - - /* Mega-Hack -- see "msg_print()" */ - msg_flag = FALSE; - - /* Clear the top line */ - prt("", 0, 0); - - /* Hack -- turn off some things */ - disturb(1, 0); - - /* Mega-Hack -- Delay death */ - if (p_ptr->chp < 0) death = FALSE; - - /* Hardcode panic save */ - panic_save = 1; - - /* Forbid suspend */ - signals_ignore_tstp(); - - /* Indicate panic save */ - (void)strcpy(died_from, "(panic save)"); - - /* Panic save, or get worried */ - if (!save_player()) quit("panic save failed!"); - - /* Successful panic save */ - quit("panic save succeeded!"); -} - - -/* * Grab a randomly selected line in lib/file/file_name */ errr get_rnd_line(char *file_name, char *output) @@ -6368,30 +6323,6 @@ static void handle_signal_abort(int sig) /* Flush output */ Term_fresh(); - /* Panic Save */ - panic_save = 1; - - /* Panic save */ - (void)strcpy(died_from, "(panic save)"); - - /* Forbid suspend */ - signals_ignore_tstp(); - - /* Attempt to save */ - if (save_player()) - { - Term_putstr(45, 23, -1, TERM_RED, "Panic save succeeded!"); - } - - /* Save failed */ - else - { - Term_putstr(45, 23, -1, TERM_RED, "Panic save failed!"); - } - - /* Flush output */ - Term_fresh(); - /* Quit */ quit(format("software bug %d %d", p_ptr->px, p_ptr->py)); } |