summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-01 16:49:40 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-01 16:49:40 +0000
commited0cc797420e2bdf4948d035c712c4d3184f9594 (patch)
treecc0a42b77a1e7d953b684168b85315a06f8054ea /crawl-ref/source/files.cc
parente2633053430e38678759221f2afe8059f2b9006b (diff)
downloadcrawl-ref-ed0cc797420e2bdf4948d035c712c4d3184f9594.tar.gz
crawl-ref-ed0cc797420e2bdf4948d035c712c4d3184f9594.zip
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
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc16
1 files changed, 11 insertions, 5 deletions
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<dungeon_feature_type>(stair_taken),
+ find_first);
you.moveto(where_to_go);
}