From 640b6d6ce5afa94a3c4a147cb6429968cb5da543 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 6 Jul 2022 20:16:12 +0300 Subject: [PATCH] Untrap monster in trap on melting ice Monster trapped in a trap on melting ice, the monster stayed trapped even as the trap was removed when the ice melted. --- src/trap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/trap.c b/src/trap.c index 00ff3e17e..85ad82b74 100644 --- a/src/trap.c +++ b/src/trap.c @@ -6245,6 +6245,10 @@ trap_ice_effects(coordxy x, coordxy y, boolean ice_is_melting) struct trap *ttmp = t_at(x, y); if (ttmp && ice_is_melting) { + struct monst *mtmp; + + if (((mtmp = m_at(x, y)) != 0) && mtmp->mtrapped) + mtmp->mtrapped = 0; if (ttmp->ttyp == LANDMINE || ttmp->ttyp == BEAR_TRAP) { /* landmine or bear trap set on top of the ice falls into the water */