summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-movetarget.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-10-31 01:42:17 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-10-31 01:42:17 +0100
commitaacbd52137bd2f5668c1628c099a9fb1e366ceef (patch)
treed50edc7dce5bc8f086405874f18e3c2c93b7d65f /crawl-ref/source/mon-movetarget.cc
parent195423d2fcb151afe1e8c6407e4fc5985c9c9ba5 (diff)
downloadcrawl-ref-aacbd52137bd2f5668c1628c099a9fb1e366ceef.tar.gz
crawl-ref-aacbd52137bd2f5668c1628c099a9fb1e366ceef.zip
ZotDef: don't crash when a monster somehow gets into loot vaults.
This should never happen for hostiles, but you can teleport into and summon stuff. You can even aggro your summons so an allegiance check wouldn't be right. Keeping the assert, though -- in any case where it fails, the monster would stare blankly into the space, not responding to attacks. Better to crash than to give a free victory.
Diffstat (limited to 'crawl-ref/source/mon-movetarget.cc')
-rw-r--r--crawl-ref/source/mon-movetarget.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-movetarget.cc b/crawl-ref/source/mon-movetarget.cc
index 906d87f7b3..b616e65473 100644
--- a/crawl-ref/source/mon-movetarget.cc
+++ b/crawl-ref/source/mon-movetarget.cc
@@ -84,7 +84,8 @@ static void _set_no_path_found(monster* mon)
#ifdef DEBUG_PATHFIND
mpr("No path found!");
#endif
- if (crawl_state.game_is_zotdef() && you.level_type == LEVEL_DUNGEON)
+ if (crawl_state.game_is_zotdef() && you.level_type == LEVEL_DUNGEON
+ && !testbits(env.pgrid(mon->pos()), FPROP_NO_RTELE_INTO))
{
if (you.wizard)
{