diff --git a/doc/fixes34.4 b/doc/fixes34.4 index a5b327a7e..f988bdaa8 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -151,6 +151,7 @@ some messages which referred to "mirror" ought to have used "looking glass" incubi react to mirrors alignment of Angels was handled inconsistently pets capable of digging could pass through walls and stone on the Rogue level +avoid inappropriate "the corridor disappears" when vault guard gets killed Platform- and/or Interface-Specific Fixes diff --git a/src/vault.c b/src/vault.c index 44eef7322..a65c2d7b0 100644 --- a/src/vault.c +++ b/src/vault.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)vault.c 3.5 2003/01/15 */ +/* SCCS Id: @(#)vault.c 3.5 2005/10/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -18,19 +18,21 @@ STATIC_DCL void FDECL(wallify_vault,(struct monst *)); STATIC_OVL boolean clear_fcorr(grd, forceshow) -register struct monst *grd; -register boolean forceshow; +struct monst *grd; +boolean forceshow; { register int fcx, fcy, fcbeg; - register struct monst *mtmp; + struct monst *mtmp; + boolean sawcorridor = FALSE; + struct egd *egrd = EGD(grd); - if (!on_level(&(EGD(grd)->gdlevel), &u.uz)) return TRUE; + if (!on_level(&egrd->gdlevel, &u.uz)) return TRUE; - while((fcbeg = EGD(grd)->fcbeg) < EGD(grd)->fcend) { - fcx = EGD(grd)->fakecorr[fcbeg].fx; - fcy = EGD(grd)->fakecorr[fcbeg].fy; + while ((fcbeg = egrd->fcbeg) < egrd->fcend) { + fcx = egrd->fakecorr[fcbeg].fx; + fcy = egrd->fakecorr[fcbeg].fy; if((grd->mhp <= 0 || !in_fcorridor(grd, u.ux, u.uy)) && - EGD(grd)->gddone) + egrd->gddone) forceshow = TRUE; if((u.ux == fcx && u.uy == fcy && grd->mhp > 0) || (!forceshow && couldsee(fcx,fcy)) @@ -45,12 +47,14 @@ register boolean forceshow; (void) rloc(mtmp, FALSE); } } - levl[fcx][fcy].typ = EGD(grd)->fakecorr[fcbeg].ftyp; + if (levl[fcx][fcy].typ == CORR && cansee(fcx, fcy)) + sawcorridor = TRUE; + levl[fcx][fcy].typ = egrd->fakecorr[fcbeg].ftyp; map_location(fcx, fcy, 1); /* bypass vision */ if(!ACCESSIBLE(levl[fcx][fcy].typ)) block_point(fcx,fcy); - EGD(grd)->fcbeg++; + egrd->fcbeg++; } - if(grd->mhp <= 0) { + if (sawcorridor) { pline_The("corridor disappears."); if(IS_ROCK(levl[u.ux][u.uy].typ)) You("are encased in rock."); }