]> granicus.if.org Git - nethack/commitdiff
B10005 fire traps under water
authorcohrs <cohrs>
Mon, 14 Oct 2002 00:10:44 +0000 (00:10 +0000)
committercohrs <cohrs>
Mon, 14 Oct 2002 00:10:44 +0000 (00:10 +0000)
<Someone> reported that after pushing a boulder into a pool location which
contained a fire trap on the bottom, that the trap wasn't destroyed.  Added
missing delfloortrap call.

doc/fixes34.1
src/do.c

index e9cae5d6180414ebce824691a151235eb29fa70b..7e45507231d614a45055d3031fde2697d045823f 100644 (file)
@@ -277,6 +277,7 @@ when summoning nasty monsters, use new monster's type to decide if they can
 don't display the "intones:" prefix when !soundok since the message suffix
        won't be displayed in this case
 document "sound" option in Guidebook
+destroy traps that are buried by boulders dropped in water
 
 
 Platform- and/or Interface-Specific Fixes
index a255ca20ef1d3cfaed3db467a1bcc72c306b8451..95fc8d5ce1248e6c66cd208296f570dfb5d47cda 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -72,13 +72,17 @@ boolean pushing;
            fills_up = lava ? chance == 0 : chance != 0;
 
            if (fills_up) {
+               struct trap *ttmp = t_at(rx, ry);
+
                if (ltyp == DRAWBRIDGE_UP) {
                    levl[rx][ry].drawbridgemask &= ~DB_UNDER; /* clear lava */
                    levl[rx][ry].drawbridgemask |= DB_FLOOR;
                } else
                    levl[rx][ry].typ = ROOM;
 
+               if (ttmp) (void) delfloortrap(ttmp);
                bury_objs(rx, ry);
+               
                newsym(rx,ry);
                if (pushing) {
                    You("push %s into the %s.", the(xname(otmp)), what);