summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 13:46:22 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 13:46:22 +0000
commit45c785fc5a74ff3df82b88f01657f6b6ad50fc0b (patch)
tree6a2040caed600f8490f61e3ce3a618e41b392af1 /crawl-ref/source/dungeon.cc
parent8c1ef076fff9a86f9f31613ab7c42bee0c56c882 (diff)
downloadcrawl-ref-45c785fc5a74ff3df82b88f01657f6b6ad50fc0b.tar.gz
crawl-ref-45c785fc5a74ff3df82b88f01657f6b6ad50fc0b.zip
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
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc17
1 files changed, 17 insertions, 0 deletions
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)
{