From: PatR Date: Mon, 25 Feb 2019 23:33:43 +0000 (-0800) Subject: fix #H8271 - wearing armor vs perm_invent window X-Git-Tag: NetHack-3.6.2_Released~47^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b2106743ed2d661d63ee6d98f9ff0ba8f57408a;p=nethack fix #H8271 - wearing armor vs perm_invent window A relatively recent change moved 'obj->known = 1' when wearing armor from before setworn(), which issues an update_inventory() call, to afterwards. There wasn't any particular update then, so observing the enchantment of armor by wearing it wasn't being reflected in the persistent inventory window if that was enabled. --- diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 7a8595c78..c9b5c83cd 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.262 $ $NHDT-Date: 1550868876 2019/02/22 20:54:36 $ +$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.263 $ $NHDT-Date: 1551137618 2019/02/25 23:33:38 $ This fixes36.2 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.1 in April 2018. Please note, however, @@ -441,6 +441,8 @@ after 'when donning armor, enchanment becomes known even if interrupted' fix, worn in a slot which usually has one) didn't make +/- become known having an artifact wish be refused ("for a moment you feel in your hands, but it disappears") would immediately segfault +when persistent inventory window is enabled, wearing armor doesn't immediately + update it with armor's newly observed +/- value tty: turn off an optimization that is the suspected cause of Windows reported partial status lines following level changes tty: ensure that current status fields are always copied to prior status diff --git a/src/hack.c b/src/hack.c index ed9f6c8ee..ddb4a5f05 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.c $NHDT-Date: 1549231692 2019/02/03 22:08:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.207 $ */ +/* NetHack 3.6 hack.c $NHDT-Date: 1551137618 2019/02/25 23:33:38 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.208 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2886,6 +2886,8 @@ const char *msg_override; encumbrance hack for levitation--see weight_cap()) */ afternmv = (int NDECL((*))) 0; (void) (*f)(); + /* for finishing Armor/Boots/&c_on() */ + update_inventory(); } }