]> granicus.if.org Git - nethack/commitdiff
clear pits in temporary corridor
authornethack.allison <nethack.allison>
Sun, 26 Mar 2006 03:52:46 +0000 (03:52 +0000)
committernethack.allison <nethack.allison>
Sun, 26 Mar 2006 03:52:46 +0000 (03:52 +0000)
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
src/vault.c

index ac45b237ee480a6bb0f99d68f1424e41d3f7f367..ba3bf3b952cb1d2889688f3985ede37f52b922e9 100644 (file)
@@ -202,6 +202,7 @@ Magicbane should not produce "<something> 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
index 2d0b3a0b8855715fc72dbfd49d867662ba17d090..77994ef1fc25381b8f10aa32068491ce00c0837e 100644 (file)
@@ -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;