summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-scan.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-01-31 12:30:59 -0500
committerNeil Moore <neil@s-z.org>2014-01-31 12:30:59 -0500
commit2bf61e57450fed39e2aa39d7cb698fe8d10f1c73 (patch)
tree8c642e3b8a6c2b7bd96b358c24d2d584e4c58118 /crawl-ref/source/dbg-scan.cc
parent192af8142f6b13e335719d228740645f0848ef50 (diff)
downloadcrawl-ref-2bf61e57450fed39e2aa39d7cb698fe8d10f1c73.tar.gz
crawl-ref-2bf61e57450fed39e2aa39d7cb698fe8d10f1c73.zip
Don't crash on debug scan when an exit feature is covered.
See !lm EightySix fofi crash -log for an example. Now we also check the terrain change markers for the desired feature.
Diffstat (limited to 'crawl-ref/source/dbg-scan.cc')
-rw-r--r--crawl-ref/source/dbg-scan.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/dbg-scan.cc b/crawl-ref/source/dbg-scan.cc
index 2f8e7ada2a..d075f11aa9 100644
--- a/crawl-ref/source/dbg-scan.cc
+++ b/crawl-ref/source/dbg-scan.cc
@@ -687,10 +687,14 @@ void check_map_validity()
continue;
// no mimics below
- if (feat == portal)
+ const dungeon_feature_type orig = orig_terrain(*ri);
+ if (feat == portal || orig == portal)
portal = DNGN_UNSEEN;
- if (feat == exit)
+ if (feat == exit || orig == exit)
exit = DNGN_UNSEEN;
+
+
+
}
if (portal && you.char_direction != GDT_ASCENDING)