From 7da9fbce1aed84ac9b02d8c4f7363ca02429d238 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 28 Jul 2009 07:19:25 +0000 Subject: Backport r10443: generalized way of dealing with "disconnect at --more--" hacks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10444 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crawl-ref/source/spells3.cc') diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 8740fae83d..56d2c079aa 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1319,6 +1319,18 @@ static bool _teleport_player( bool allow_control, bool new_abyss_area ) show_map(pos, false); redraw_screen(); +#if defined(USE_UNIX_SIGNALS) && defined(SIGHUP_SAVE) && defined(USE_CURSES) + // If we've received a HUP signal then the user can't choose a + // location, so cancel the teleport. + if (crawl_state.seen_hups) + { + mpr("Controlled teleport interrupted by HUP signal, " + "cancelling teleport.", MSGCH_ERROR); + you.turn_is_over = false; + return (false); + } +#endif + #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", pos.x, pos.y ); #endif -- cgit v1.2.3-54-g00ecf