From: Pasi Kallinen Date: Mon, 18 Apr 2016 16:52:54 +0000 (+0300) Subject: Fix dead mon and guard sanity checking X-Git-Tag: NetHack-3.6.1_RC01~823 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a181c2f93b758cd50efb91ad08e1131837132c9c;p=nethack Fix dead mon and guard sanity checking --- diff --git a/src/mon.c b/src/mon.c index 2e339152d..d5ac2e0bb 100644 --- a/src/mon.c +++ b/src/mon.c @@ -84,8 +84,10 @@ mon_sanity_check() for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { sanity_check_single_mon(mtmp, TRUE, "fmon"); + if (DEADMONSTER(mtmp)) + continue; x = mtmp->mx, y = mtmp->my; - if (!isok(x, y) || (x == 0 && !mtmp->isgd)) + if (!isok(x, y) && !(mtmp->isgd && x == 0 && y == 0)) impossible("mon (%s) claims to be at <%d,%d>?", fmt_ptr((genericptr_t) mtmp), x, y); else if (level.monsters[x][y] != mtmp)