From 45c785fc5a74ff3df82b88f01657f6b6ad50fc0b Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 18 Nov 2008 13:46:22 +0000 Subject: Portal vault and labyrinth exits will return to the point on the dungeon level where the entrance was. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7470 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dungeon.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crawl-ref/source/dungeon.cc') diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 708fdf1064..a8733319e1 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -7747,6 +7747,23 @@ coord_def dgn_find_nearby_stair(dungeon_feature_type stair_to_find, dungeon_feature_name(stair_to_find)); #endif + if (stair_to_find == DNGN_EXIT_PORTAL_VAULT) + { + const coord_def pos(_dgn_find_feature_marker(stair_to_find)); + if (in_bounds(pos)) + { + if (map_marker *marker = env.markers.find(pos, MAT_FEATURE)) + env.markers.remove(marker); + return (pos); + } + +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_WARN, "Ouch, no portal vault exit point!"); +#endif + + stair_to_find = DNGN_FLOOR; + } + if (stair_to_find == DNGN_ESCAPE_HATCH_UP || stair_to_find == DNGN_ESCAPE_HATCH_DOWN) { -- cgit v1.2.3-54-g00ecf