docall fix

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'.
This commit is contained in:
PatR
2019-11-22 02:46:28 -08:00
parent 5cad6a15dc
commit d4df876a6f
2 changed files with 6 additions and 2 deletions

View 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 */