diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-11 16:08:22 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-11 16:08:22 +0000 |
commit | 86a4b3a425d3afef3a2bd2304d08e87b6b49ff01 (patch) | |
tree | c57dcafc5349f9e06705f27cb9181e2389842773 /crawl-ref/source/misc.cc | |
parent | 6ac25ffd6efaa21bc9ac1d9a5828e7ae6412d292 (diff) | |
download | crawl-ref-86a4b3a425d3afef3a2bd2304d08e87b6b49ff01.tar.gz crawl-ref-86a4b3a425d3afef3a2bd2304d08e87b6b49ff01.zip |
Apply r6500 to 0.4.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 7e23bd12e7..4dd1b21753 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1623,6 +1623,8 @@ void up_stairs(dungeon_feature_type force_stair, branches[you.where_are_you].longname); } + int stair_x = you.x_pos, stair_y = you.y_pos; + #ifdef USE_TILE const bool newlevel = #endif @@ -1677,8 +1679,6 @@ void up_stairs(dungeon_feature_type force_stair, travel_cache.get_level_info(new_level_id); new_level_info.update(); - int stair_x = you.x_pos, stair_y = you.y_pos; - // First we update the old level's stair. level_pos lp; lp.id = new_level_id; @@ -1698,12 +1698,12 @@ void up_stairs(dungeon_feature_type force_stair, 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; - guess = true; + old_level_info.clear_stairs(DNGN_EXIT_HELL); + } + else + { + old_level_info.update_stair(stair_x, stair_y, lp, guess); } - - old_level_info.update_stair(you.x_pos, you.y_pos, lp, guess); // We *guess* that going up a staircase lands us on a downstair, // and that we can descend that downstair and get back to where we |