diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-22 01:22:34 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-22 01:22:34 +0000 |
commit | a6fa467deec581b1f0c1392e2658c7072c1a994d (patch) | |
tree | 7f0213abf52fb50724c2a614a5c31f0117afe1d7 /crawl-ref/source/misc.cc | |
parent | df61a8134cdf7f61511315b8e2a6b537858fc330 (diff) | |
download | crawl-ref-a6fa467deec581b1f0c1392e2658c7072c1a994d.tar.gz crawl-ref-a6fa467deec581b1f0c1392e2658c7072c1a994d.zip |
Let a level_id be directly compared to a branch type with == and != to
determine if a level_id is (not) in BRANCH_FOO; takes care of comparing
level_type to LEVEL_DUNGEON.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6034 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b6851642de..c975143f50 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1699,8 +1699,8 @@ void up_stairs(dungeon_feature_type force_stair, // to Hell as shortcuts between dungeon levels, which won't work, // and will confuse the dickens out of the player (well, it confused // the dickens out of me when it happened). - if (new_level_id.branch == BRANCH_MAIN_DUNGEON - && old_level_id.branch == BRANCH_VESTIBULE_OF_HELL) + if (new_level_id == BRANCH_MAIN_DUNGEON + && old_level_id == BRANCH_VESTIBULE_OF_HELL) { lp.id.depth = -1; lp.pos.x = lp.pos.y = -1; @@ -1713,7 +1713,7 @@ void up_stairs(dungeon_feature_type force_stair, // and that we can descend that downstair and get back to where we // came from. This assumption is guaranteed false when climbing out // of one of the branches of Hell. - if (new_level_id.branch != BRANCH_VESTIBULE_OF_HELL) + if (new_level_id != BRANCH_VESTIBULE_OF_HELL) { // Set the new level's stair, assuming arbitrarily that going // downstairs will land you on the same upstairs you took to |