From 3ec8eb59de97145a44161bc31b4d1a8f2c6a0f3b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 22 Apr 2024 16:34:27 +0300 Subject: [PATCH] Fix off-map monster doing things m_move could make monster go off-map (by eg. using a trap), but the return values don't reflect that --- src/monmove.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/monmove.c b/src/monmove.c index bd0241aaa..ec95aa467 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -859,6 +859,8 @@ dochug(struct monst *mtmp) if (!status) status = m_move(mtmp, 0); + if (mon_offmap(mtmp)) + return 1; if (status != MMOVE_DIED) distfleeck(mtmp, &inrange, &nearby, &scared); /* recalc */