From 280823536c2f9cd15bbc2232e5e9abfb5d617ea4 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sun, 26 Mar 2006 03:52:46 +0000 Subject: [PATCH] clear pits in temporary corridor From a bug report, then leave the corridor (causing it to > vanish), the pit will be embedded in rock instead of being removed. clear any pits that the hero digs in the vault guard's temporary corridor --- doc/fixes34.4 | 1 + src/vault.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index ac45b237e..ba3bf3b95 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -202,6 +202,7 @@ Magicbane should not produce " are confused" message handle antholes more sensibly when ants aren't available cancelled nurses shouldn't say "Relax, this won't hurt a bit" check for hero location in digactualhole() before clearing u.utrap +clear any pits that the hero digs in the vault guard's temporary corridor Platform- and/or Interface-Specific Fixes diff --git a/src/vault.c b/src/vault.c index 2d0b3a0b8..77994ef1f 100644 --- a/src/vault.c +++ b/src/vault.c @@ -46,6 +46,7 @@ boolean forceshow; struct monst *mtmp; boolean sawcorridor = FALSE; struct egd *egrd = EGD(grd); + struct trap *trap = (struct trap *)0; if (!on_level(&egrd->gdlevel, &u.uz)) return TRUE; @@ -68,6 +69,13 @@ boolean forceshow; (void) rloc(mtmp, FALSE); } } + if ((trap = t_at(fcx,fcy)) != 0 && + trap->ttyp == PIT && trap->madeby_u && + IS_STWALL(egrd->fakecorr[fcbeg].ftyp)) { + /* you dug a pit while following the guard out, + so fill it in when the location reverts to stone */ + deltrap(trap); + } if (levl[fcx][fcy].typ == CORR && cansee(fcx, fcy)) sawcorridor = TRUE; levl[fcx][fcy].typ = egrd->fakecorr[fcbeg].ftyp; -- 2.40.0