]> granicus.if.org Git - nethack/commitdiff
docall fix
authorPatR <rankin@nethack.org>
Fri, 22 Nov 2019 10:46:28 +0000 (02:46 -0800)
committerPatR <rankin@nethack.org>
Fri, 22 Nov 2019 10:46:28 +0000 (02:46 -0800)
Noticed while testing something:  hero drank a potion of see invisible
and nearby invisible monster could now be seen--in theory--but I was
asked what to call the potion while the updated map was buffered.  So
I didn't see the invisible monster until after naming the potion.

pline() flushes buffered map updates, but getlin() doesn't.  I didn't
change that, but I've made docall() do so since the updated map may
make a difference in what the player can tell about whatever is being
'called'.

doc/fixes36.3
src/do_name.c

index 4f7ec8ea6e8477047fe6b829af862b8f2ac85e90..97849634860dea9bb1368241887e17cd7493c5f8 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.187 $ $NHDT-Date: 1574387029 2019/11/22 01:43:49 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.188 $ $NHDT-Date: 1574419578 2019/11/22 10:46:18 $
 
 This fixes36.3 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -292,6 +292,9 @@ fix several tribute typos
 pluralization correction for unlikely epoch and loch
 ensure that --showpaths displays the personal configuration file last
 don't strip leading slash from hallucinatory monster name "/b/tard"
+quaffing unknown potion of see invisible resulted in asking what to call the
+       potion while updated monster display was buffered so not yet shown,
+       hence potentially noticeable effect was concealed from player
 unix: Fix double DLB definition in linux hints file
 windows: fix --showpaths output for the data file which relies on being
        constructed programmatically to incorporate the version suffix
index 354850a815be95dd956c3d36def9b113562ffae5..ed0eea5a1cd47dedb25a0a69f08b04fe32a61d24 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 do_name.c       $NHDT-Date: 1574387027 2019/11/22 01:43:47 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ */
+/* NetHack 3.6 do_name.c       $NHDT-Date: 1574419578 2019/11/22 10:46:18 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.152 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Pasi Kallinen, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1473,6 +1473,7 @@ struct obj *obj;
 
     if (!obj->dknown)
         return; /* probably blind */
+    flush_screen(1); /* buffered updates might matter to player's response */
 
     if (obj->oclass == POTION_CLASS && obj->fromsink)
         /* kludge, meaning it's sink water */