summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-scan.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-08-31 03:08:48 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-09-01 02:07:57 +0200
commitf214540b719b03f528392787a5883cffb6937c53 (patch)
treeb58e001e48580b8551e0fcbb3f44a347f7d4e385 /crawl-ref/source/dbg-scan.cc
parent70ca29ee15926336c0ab2369cb25743a9e510e08 (diff)
downloadcrawl-ref-f214540b719b03f528392787a5883cffb6937c53.tar.gz
crawl-ref-f214540b719b03f528392787a5883cffb6937c53.zip
Check for monsters invading a player's personal space.
Diffstat (limited to 'crawl-ref/source/dbg-scan.cc')
-rw-r--r--crawl-ref/source/dbg-scan.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/dbg-scan.cc b/crawl-ref/source/dbg-scan.cc
index 273224589e..82ca3a9ea7 100644
--- a/crawl-ref/source/dbg-scan.cc
+++ b/crawl-ref/source/dbg-scan.cc
@@ -15,6 +15,7 @@
#include "dbg-util.h"
#include "dungeon.h"
#include "env.h"
+#include "godabil.h"
#include "itemname.h"
#include "libutil.h"
#include "message.h"
@@ -477,6 +478,14 @@ void debug_mons_scan()
ASSERT(menv[idx].mid == mc->first);
}
+ if (in_bounds(you.pos()))
+ if (const monster* m = monster_at(you.pos()))
+ if (!m->submerged() && !fedhas_passthrough(m))
+ {
+ mprf(MSGCH_ERROR, "Error: player on same spot as monster: %s(%d)",
+ m->name(DESC_PLAIN, true).c_str(), m->mindex());
+ }
+
// No problems?
if (!warned)
return;