From: Pasi Kallinen Date: Sat, 5 Mar 2022 11:42:24 +0000 (+0200) Subject: Fix monster trapped in nonexistent trap, pt 2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2efae280abe1c64014d259f68a7dbbd2e668b7c;p=nethack Fix monster trapped in nonexistent trap, pt 2 Monster hiding under an item on a location with a land mine, a rolling boulder trap launches a boulder which blows up the mine, and all the items scatter away. If the hider survived that, it was still hiding. --- diff --git a/src/explode.c b/src/explode.c index 661eb1c16..6effc7523 100644 --- a/src/explode.c +++ b/src/explode.c @@ -840,6 +840,8 @@ scatter(int sx, int sy, /* location of objects to scatter */ newsym(sx, sy); if (u_at(sx, sy) && u.uundetected && hides_under(g.youmonst.data)) (void) hideunder(&g.youmonst); + if (((mtmp = m_at(sx, sy)) != 0) && mtmp->mtrapped) + mtmp->mtrapped = 0; if (lostgoods) /* implies shop_origin and therefore shkp valid */ credit_report(shkp, 1, FALSE); return total;