From ed0cc797420e2bdf4948d035c712c4d3184f9594 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 1 Aug 2007 16:49:40 +0000 Subject: Labyrinth entry points are now a guaranteed minimum distance away from the exit. Exits from bazaars are treated as rock stairs instead of stone stairs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1952 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/files.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 437ea5b389..bc9704669f 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -643,7 +643,8 @@ static void sanity_test_monster_inventory() } } -static void place_player_on_stair(branch_type old_branch, int stair_taken) +static void place_player_on_stair(branch_type old_branch, + int stair_taken) { bool find_first = true; @@ -666,8 +667,7 @@ static void place_player_on_stair(branch_type old_branch, int stair_taken) stair_taken = DNGN_ENTER_ABYSS; find_first = false; } - else if (stair_taken == DNGN_ENTER_HELL - || stair_taken == DNGN_ENTER_LABYRINTH) + else if (stair_taken == DNGN_ENTER_HELL) { // the vestibule and labyrith always start from this stair stair_taken = DNGN_STONE_STAIRS_UP_I; @@ -710,7 +710,12 @@ static void place_player_on_stair(branch_type old_branch, int stair_taken) } else if (stair_taken == DNGN_EXIT_PORTAL_VAULT) { - stair_taken = DNGN_STONE_STAIRS_DOWN_I; + stair_taken = DNGN_ROCK_STAIRS_DOWN; + } + else if (stair_taken == DNGN_ENTER_LABYRINTH) + { + // dgn_find_nearby_stair uses special logic for labyrinths. + stair_taken = DNGN_ENTER_LABYRINTH; } else // Note: stair_taken can equal things like DNGN_FLOOR { @@ -720,7 +725,8 @@ static void place_player_on_stair(branch_type old_branch, int stair_taken) } const coord_def where_to_go = - dgn_find_nearby_stair(stair_taken, find_first); + dgn_find_nearby_stair(static_cast(stair_taken), + find_first); you.moveto(where_to_go); } -- cgit v1.2.3-54-g00ecf