summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-transloc.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-12-31 13:59:38 -0500
committerNeil Moore <neil@s-z.org>2012-12-31 13:59:38 -0500
commit16b5b170620b4359451b5e5030d2d06433914f65 (patch)
treeaa753799976d94634a32262f348fd78f4f5aa7f4 /crawl-ref/source/spl-transloc.cc
parentb370d7fcd3db4a2954aa904052bd6e5103540f1b (diff)
downloadcrawl-ref-16b5b170620b4359451b5e5030d2d06433914f65.tar.gz
crawl-ref-16b5b170620b4359451b5e5030d2d06433914f65.zip
Don't lose mana and time on HUP-aborted cblink.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r--crawl-ref/source/spl-transloc.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc
index d2caa9203a..86e76b513e 100644
--- a/crawl-ref/source/spl-transloc.cc
+++ b/crawl-ref/source/spl-transloc.cc
@@ -177,7 +177,7 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink,
else
{
// query for location {dlb}:
- while (!crawl_state.seen_hups)
+ while (1)
{
direction_chooser_args args;
args.restricts = DIR_TARGET;
@@ -186,6 +186,11 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink,
args.top_prompt = "Blink to where?";
direction(beam, args);
+ if (crawl_state.seen_hups) {
+ mpr("Cancelling blink due to HUP.");
+ return -1;
+ }
+
if (!beam.isValid || beam.target == you.pos())
{
if (!wizard_blink