]> granicus.if.org Git - nethack/commitdiff
secret door detection
authorarromdee <arromdee>
Sat, 26 Jan 2002 02:26:28 +0000 (02:26 +0000)
committerarromdee <arromdee>
Sat, 26 Jan 2002 02:26:28 +0000 (02:26 +0000)
There was an old bug where a wand of secret door detection was identified
even though it didn't find anything.

It was unconfirmed, but I had no trouble confirming it.  It happened because
the wand worked on squares that were couldsee() but which (because they weren't
lit) you couldn't actually see.  The wand would detect the secret corridor and
then not display it because it was out of sight.

I fixed it to display the corridor, in sight or not (I could have had it not
detect anything, but the wand is fairly weak already.)

doc/fixes33.2
src/detect.c

index f5a19904febebbf3d6998826f7920ef368b632da..0d392f0bf1dcd06ea5042fd8a28b9b552ddd268e 100644 (file)
@@ -406,6 +406,8 @@ correctly handle polymorphed quest leader
 swallowing zombies/mummies whole makes you sick, like when eating them normally
 impose additional teleport restrictions on the no-teleport Plane of Air
 landmines set off by pushed boulders have same effects as stepping on them
+secret corridor detected out of vision range is still displayed (prevents bug
+       where wand of secret door detection found nothing but still identified)
 
 
 Platform- and/or Interface-Specific Fixes
index c77c6e612644dcbb23f214139db0201fe9d61bce..714e5d02fb403082253675d63d1296046927c96e 100644 (file)
@@ -957,10 +957,13 @@ genericptr_t num;
 
        if(levl[zx][zy].typ == SDOOR) {
                cvt_sdoor_to_door(&levl[zx][zy]);       /* .typ = DOOR */
+               magic_map_background(zx, zy, 0);
                newsym(zx, zy);
                (*(int*)num)++;
        } else if(levl[zx][zy].typ == SCORR) {
                levl[zx][zy].typ = CORR;
+               unblock_point(zx,zy);
+               magic_map_background(zx, zy, 0);
                newsym(zx, zy);
                (*(int*)num)++;
        } else if ((ttmp = t_at(zx, zy)) != 0) {