From d5e5340c3926d1cf97f6cba151ffaecb20bfb35f Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 2 Aug 2006 12:54:15 +0000 Subject: Integrated travel patch as of 20060727 git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7 c06c8d41-db1a-0410-9941-cceddc491573 --- trunk/source/ouch.cc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'trunk/source/ouch.cc') diff --git a/trunk/source/ouch.cc b/trunk/source/ouch.cc index cda5db8667..f9a5f514dd 100644 --- a/trunk/source/ouch.cc +++ b/trunk/source/ouch.cc @@ -27,6 +27,7 @@ #include "AppHdr.h" #include +#include #include #include #include @@ -57,6 +58,10 @@ #include "ouch.h" +#ifdef __MINGW32__ +#include +#endif + #include "externs.h" #include "chardump.h" @@ -546,6 +551,9 @@ void ouch( int dam, int death_source, char death_type, const char *aux ) int d = 0; int e = 0; + ait_hp_loss hpl(dam, death_type); + interrupt_activity( AI_HP_LOSS, &hpl ); + if (you.deaths_door && death_type != KILLED_BY_LAVA && death_type != KILLED_BY_WATER) { @@ -625,7 +633,7 @@ void ouch( int dam, int death_source, char death_type, const char *aux ) mpr( info, MSGCH_DIAGNOSTICS ); #endif // DEBUG_DIAGNOSTICS - if (!yesno("Die?", false)) + if (!yesno("Die?", false, 'n')) { set_hp(you.hp_max, false); return; @@ -933,9 +941,20 @@ void end_game( struct scorefile_entry &se ) // last, but not least, delete player .sav file strcpy(del_file, info); + + std::string basefile = del_file; + strcat(del_file, ".sav"); unlink(del_file); + // Delete record of stashes, kills, travel cache and lua save. + unlink( (basefile + ".st").c_str() ); + unlink( (basefile + ".kil").c_str() ); + unlink( (basefile + ".tc").c_str() ); +#ifdef CLUA_BINDINGS + unlink( (basefile + ".lua").c_str() ); +#endif + // death message if (dead) { @@ -956,7 +975,7 @@ void end_game( struct scorefile_entry &se ) } } - invent( -1, !dead ); + invent( -1, dead ); clrscr(); if (!dump_char( "morgue.txt", !dead )) -- cgit v1.2.3-54-g00ecf