]> granicus.if.org Git - nethack/commitdiff
display glitch: warning vs remembered,unseen
authorPatR <rankin@nethack.org>
Thu, 26 Apr 2018 22:07:00 +0000 (15:07 -0700)
committerPatR <rankin@nethack.org>
Thu, 26 Apr 2018 22:07:00 +0000 (15:07 -0700)
Noticed while testing the fix for the recently reported clairvoyance
bug.  I saw a '1' move onto an 'I', then when it moved again the 'I'
reappeared.  The remembered unseen monster couldn't be there anymore
if the warned-of monster was able to walk through that spot, so
remove any 'I' when showing a warning (digit) to stop remembering an
unseen monster at the warning spot.

Nobody has ever reported this so fixing it isn't urgent, but fixing
it is trivial so I'm doing it in now (without the clairvoyance fix).

doc/fixes36.1
src/display.c

index 7c89019d0c0153583da3be62a6bbb49ef271aadc..0d8bf47b5c81c39504d856848f03e443109b3db6 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.446 $ $NHDT-Date: 1524689549 2018/04/25 20:52:29 $
+$NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.448 $ $NHDT-Date: 1524780380 2018/04/26 22:06:20 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -542,6 +542,9 @@ at the prompt for entering a level annotation, responding with <return>
 reorder the #droptype menu and add some separator lines
 moving from a pit to an adjacent pit with uncleared debris shouldn't be a fall
 open drawbridge spanning ice would vanish if the ice melted
+if a warned-of mon moved onto a spot containing a 'remembered, unseen mon'
+       then moved off, the unseen marker was redisplayed even though the
+       hero should now know that the remembered monster isn't there anymore
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index d946ec965f42e2b88d5b7950f2b6635819d6bd58..5c98c8a994f439a6db72e0b9f29d46bd582d00c7 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 display.c       $NHDT-Date: 1496101037 2017/05/29 23:37:17 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.87 $ */
+/* NetHack 3.6 display.c       $NHDT-Date: 1524780381 2018/04/26 22:06:21 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.90 $ */
 /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
 /* and Dave Cohrs, 1990.                                          */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -496,6 +496,13 @@ register struct monst *mon;
         impossible("display_warning did not match warning type?");
         return;
     }
+    /* warning glyph is drawn on the monster layer; unseen
+       monster glyph is drawn on the object/trap/floor layer;
+       if we see a 'warning' move onto 'remembered, unseen' we
+       need to explicitly remove that in order for it to not
+       reappear when the warned-of monster moves off that spot */
+    if (glyph_is_invisible(levl[x][y].glyph))
+        unmap_object(x, y);
     show_glyph(x, y, glyph);
 }