]> granicus.if.org Git - nethack/commitdiff
feeling monsters while blind and levitating
authorcohrs <cohrs>
Sun, 30 Jun 2002 22:29:58 +0000 (22:29 +0000)
committercohrs <cohrs>
Sun, 30 Jun 2002 22:29:58 +0000 (22:29 +0000)
<Someone> reported this during 3.4.0 beta.  If you are blind and levitating,
unseen monsters are shown as "I", just like when not levitating, but they
are never erased after they move, unlike not levitating.  Display this
case correctly as well.

doc/fixes34.1
src/display.c

index 2d899581c4ac02986152eddfe18cd6cf4c689cac..2bc5488091de8998fdab0569290598a580679412 100644 (file)
@@ -131,6 +131,7 @@ headstone writing was using the adjective "weird" when engraving with a wand
        of digging.
 don't report "you were riding" if you die as a result of dismounting
 allow #untrapping of chests that are co-located with floor traps and hero
+unmap "I" symbols when searching while blind and levitating
 
 
 Platform- and/or Interface-Specific Fixes
index 709e68d00caa4490b3e2206f8658b485dae50e52..bad6aa7f9ccc887a434f2407ba8035620d5b8b4c 100644 (file)
@@ -536,7 +536,8 @@ feel_location(x, y)
             * underneath if already seen.  Otherwise, show the appropriate
             * floor symbol.
             *
-            * Similarly, if the hero digs a hole in a wall.  In this case,
+            * Similarly, if the hero digs a hole in a wall or feels a location
+            * that used to contain an unseen monster.  In these cases,
             * there's no reason to assume anything was underneath, so
             * just show the appropriate floor symbol.  If something was
             * embedded in the wall, the glyph will probably already
@@ -557,8 +558,9 @@ feel_location(x, y)
                                               cmap_to_glyph(S_stone);
                    show_glyph(x,y,lev->glyph);
                }
-           } else if (lev->glyph >= cmap_to_glyph(S_stone) &&
-                      lev->glyph < cmap_to_glyph(S_room)) {
+           } else if ((lev->glyph >= cmap_to_glyph(S_stone) &&
+                       lev->glyph < cmap_to_glyph(S_room)) ||
+                      glyph_is_invisible(levl[x][y].glyph)) {
                lev->glyph = lev->waslit ? cmap_to_glyph(S_room) :
                                           cmap_to_glyph(S_stone);
                show_glyph(x,y,lev->glyph);