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
This commit is contained in:
nethack.allison
2006-03-26 03:52:46 +00:00
parent 05ce448135
commit 280823536c
2 changed files with 9 additions and 0 deletions

View File

@@ -202,6 +202,7 @@ Magicbane should not produce "<something> are confused" message
handle antholes more sensibly when ants aren't available handle antholes more sensibly when ants aren't available
cancelled nurses shouldn't say "Relax, this won't hurt a bit" cancelled nurses shouldn't say "Relax, this won't hurt a bit"
check for hero location in digactualhole() before clearing u.utrap 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 Platform- and/or Interface-Specific Fixes

View File

@@ -46,6 +46,7 @@ boolean forceshow;
struct monst *mtmp; struct monst *mtmp;
boolean sawcorridor = FALSE; boolean sawcorridor = FALSE;
struct egd *egrd = EGD(grd); struct egd *egrd = EGD(grd);
struct trap *trap = (struct trap *)0;
if (!on_level(&egrd->gdlevel, &u.uz)) return TRUE; if (!on_level(&egrd->gdlevel, &u.uz)) return TRUE;
@@ -68,6 +69,13 @@ boolean forceshow;
(void) rloc(mtmp, FALSE); (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)) if (levl[fcx][fcy].typ == CORR && cansee(fcx, fcy))
sawcorridor = TRUE; sawcorridor = TRUE;
levl[fcx][fcy].typ = egrd->fakecorr[fcbeg].ftyp; levl[fcx][fcy].typ = egrd->fakecorr[fcbeg].ftyp;