summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-transloc.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-12-31 13:28:50 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-12-31 13:28:50 +0100
commitcd80a3a79866b95a33575529c10f591d0bc20867 (patch)
tree7bac4e55ea7ae5cb2f36fc874a49d93ec04bded6 /crawl-ref/source/spl-transloc.cc
parent9da19725963eddf97a56096263bea067635de80e (diff)
downloadcrawl-ref-cd80a3a79866b95a33575529c10f591d0bc20867.tar.gz
crawl-ref-cd80a3a79866b95a33575529c10f591d0bc20867.zip
Don't lose mana+time on HUP-aborted cancellable semi-controlled blink.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r--crawl-ref/source/spl-transloc.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc
index 00c4ec1fd1..d2caa9203a 100644
--- a/crawl-ref/source/spl-transloc.cc
+++ b/crawl-ref/source/spl-transloc.cc
@@ -1042,11 +1042,17 @@ spret_type cast_semi_controlled_blink(int pow, bool cheap_cancel, bool fail)
args.restricts = DIR_DIR;
args.mode = TARG_ANY;
- while (!crawl_state.seen_hups)
+ while (1)
{
mpr("Which direction? [ESC to cancel]", MSGCH_PROMPT);
direction(bmove, args);
+ if (crawl_state.seen_hups)
+ {
+ mpr("Cancelling blink due to HUP.");
+ return SPRET_ABORT;
+ }
+
if (bmove.isValid && !bmove.delta.origin())
break;