From: Pasi Kallinen Date: Thu, 7 Jul 2022 09:27:28 +0000 (+0300) Subject: Untrap monster when lregion removes the trap X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c343d079a70e7a79056d350a74fb65b8a8dd6f9;p=nethack Untrap monster when lregion removes the trap This check really should go in deltrap itself, but that would require more effort than I have spoons for right now. --- diff --git a/src/mkmaze.c b/src/mkmaze.c index ff943666b..169532ef3 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -366,8 +366,11 @@ put_lregion_here( It might still fail if there's a dungeon feature here. */ struct trap *t = t_at(x, y); - if (t && !undestroyable_trap(t->ttyp)) + if (t && !undestroyable_trap(t->ttyp)) { + if (((mtmp = m_at(x, y)) != 0) && mtmp->mtrapped) + mtmp->mtrapped = 0; deltrap(t); + } if (bad_location(x, y, nlx, nly, nhx, nhy)) return FALSE; }