summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-19 13:17:13 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-19 13:17:13 +0000
commit3156c2e3bc0d513a4332c7f472fd6b9b31a5094e (patch)
tree122c5ac4494f743e2613176c9ed5d83daad1d480 /crawl-ref/source/ouch.cc
parentbb1a887fb819272e46b5f593d2a2debf81a802ad (diff)
downloadcrawl-ref-3156c2e3bc0d513a4332c7f472fd6b9b31a5094e.tar.gz
crawl-ref-3156c2e3bc0d513a4332c7f472fd6b9b31a5094e.zip
Handle SIGHUP. Could use improvement, but it's a start.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@673 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 1ee91d02b3..a4e0360e24 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -776,6 +776,9 @@ void ouch( int dam, int death_source, char death_type, const char *aux )
//okay, so you're dead:
+ crawl_state.need_save = false;
+ crawl_state.updating_scores = true;
+
// prevent bogus notes
activate_notes(false);
@@ -870,8 +873,8 @@ void end_game( struct scorefile_entry &se )
const int num_suffixes = sizeof(suffixes) / sizeof(const char*);
for ( i = 0; i < num_suffixes; ++i ) {
- std::string tmpname = basename + suffixes[i];
- unlink( tmpname.c_str() );
+ std::string tmpname = basename + suffixes[i];
+ unlink( tmpname.c_str() );
}
// death message
@@ -880,7 +883,9 @@ void end_game( struct scorefile_entry &se )
mpr("You die..."); // insert player name here? {dlb}
viewwindow(1, false); // don't do this for leaving/winning characters
}
- more();
+
+ if (!crawl_state.seen_hups)
+ more();
for (i = 0; i < ENDOFPACK; i++)
set_ident_flags( you.inv[i], ISFLAG_IDENT_MASK );
@@ -900,7 +905,8 @@ void end_game( struct scorefile_entry &se )
if (!dump_char( morgue_name(), !dead, true ))
{
mpr("Char dump unsuccessful! Sorry about that.");
- more();
+ if (!crawl_state.seen_hups)
+ more();
clrscr();
}
@@ -925,6 +931,7 @@ void end_game( struct scorefile_entry &se )
hiscores_print_list( get_number_of_lines() - lines - 5 );
// just to pause, actual value returned does not matter {dlb}
- get_ch();
+ if (!crawl_state.seen_hups)
+ get_ch();
end(0);
}