From d2efae280abe1c64014d259f68a7dbbd2e668b7c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 5 Mar 2022 13:42:24 +0200 Subject: [PATCH] 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. --- src/explode.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.50.1