summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 07:11:47 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 07:11:47 +0000
commit82092097b5a79e335de7845be7c80114d1d1bb52 (patch)
tree39a81d261e68a89eeb1eec9041ab0dec6590418f /crawl-ref
parent837c720f3d5e3e5f9645b997d0dd7cadead741ac (diff)
downloadcrawl-ref-82092097b5a79e335de7845be7c80114d1d1bb52.tar.gz
crawl-ref-82092097b5a79e335de7845be7c80114d1d1bb52.zip
In debug_mons_scan() if a monster is floating because another monster is
also on the same square then print a warning message about it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7633 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/debug.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index d1483249dd..e26d809bf5 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -2087,6 +2087,16 @@ void debug_mons_scan()
mprf(MSGCH_WARN, "Floating monster: %s at (%d,%d)",
m->name(DESC_PLAIN).c_str(), m->pos().x, m->pos().y);
warned = true;
+ for (int j = 0; j < MAX_MONSTERS; ++j)
+ {
+ if (i == j)
+ continue;
+
+ const monsters *m2 = &menv[j];
+ if (m2->alive() && m2->pos() == m->pos())
+ mprf(MSGCH_WARN, "Also at (%d, %d): %s",
+ m->pos().x, m->pos().y, m2->name(DESC_PLAIN).c_str());
+ }
}
}
// If there are warnings, force the dev to notice. :P