Fix dead mon and guard sanity checking

This commit is contained in:
Pasi Kallinen
2016-04-18 19:52:54 +03:00
parent d02ba84684
commit a181c2f93b

View File

@@ -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)