summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stairs.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-05-04 17:21:05 -0400
committerNeil Moore <neil@s-z.org>2012-05-04 18:48:51 -0400
commit7242852865a0f895f7c27b1d152f32ecbdca35e0 (patch)
tree9675e4c672efef5af83b423f84a479f1397857f4 /crawl-ref/source/stairs.h
parent09a9b8bc3006d248805a77121d1aed0f7f9b83c0 (diff)
downloadcrawl-ref-7242852865a0f895f7c27b1d152f32ecbdca35e0.tar.gz
crawl-ref-7242852865a0f895f7c27b1d152f32ecbdca35e0.zip
Unbreak ! on portal vault exits and escape hatches up.
level_id::get_next_level_id() checks whether the stair feature is a branch exit for some branch; if so, it returns that branch's parent. However, this is wrong for: * portal exits, where there is no parent; * dungeon exits, for the same reason; * escape hatches up, which are sometimes but not usually Lab exits. However, portal escape hatches up are branch exits (from Lab), and Lab does not have a parent. Instead, check only for the current branch's exit; if the feature does match, find the destination using the same code as up_stairs(). We split this code off into a new (global) function upstairs_destination(). For exits from D:1, return D:0 rather than NUM_BRANCHES:-1.
Diffstat (limited to 'crawl-ref/source/stairs.h')
-rw-r--r--crawl-ref/source/stairs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/stairs.h b/crawl-ref/source/stairs.h
index b1bce5336c..36fad4bc0c 100644
--- a/crawl-ref/source/stairs.h
+++ b/crawl-ref/source/stairs.h
@@ -7,6 +7,7 @@
#define STAIRS_H
bool check_annotation_exclusion_warning();
+level_id upstairs_destination();
void down_stairs(dungeon_feature_type force_stair = DNGN_UNSEEN);
void up_stairs(dungeon_feature_type force_stair = DNGN_UNSEEN);
void new_level(bool restore = false);