fix #H8183 - leather jacket doesn't show AC
Leather jacket doesn't take multiple turns to wear, so wearing it wasn't calling Armor_on() and recently moved 'uarm->known = 1' didn't get executed. Not reported yet but had the same issue: fedora and dented pot wouldn't call Helmet_on().
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.255 $ $NHDT-Date: 1549849509 2019/02/11 01:45:09 $
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.257 $ $NHDT-Date: 1550014802 2019/02/12 23:40:02 $
|
||||
|
||||
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,
|
||||
@@ -427,6 +427,9 @@ when engulfed while in a shop, dropping an item into the engulfer and then
|
||||
using ':' to look at current location could cause a crash
|
||||
when items were on the floor just inside a shop's door where the shopkeeper
|
||||
doesn't buy and sell stuff, those items showed a 'for sale' price
|
||||
after 'when donning armor, enchanment becomes known even if interrupted' fix,
|
||||
wearing a leather jacket, fedora, or dented pot (no multi-turn delay
|
||||
worn in a slot which usually has one) didn't make +/- become known
|
||||
having an artifact wish be refused ("for a moment you feel <artifact> in
|
||||
your hands, but it disappears") would immediately segfault
|
||||
tty: turn off an optimization that is the suspected cause of Windows reported
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 do_wear.c $NHDT-Date: 1549758452 2019/02/10 00:27:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.106 $ */
|
||||
/* NetHack 3.6 do_wear.c $NHDT-Date: 1550014802 2019/02/12 23:40:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.107 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1928,26 +1928,31 @@ struct obj *obj;
|
||||
obj->known = 1;
|
||||
*/
|
||||
setworn(obj, mask);
|
||||
/* if there's no delay, we'll execute 'aftermv' immediately */
|
||||
if (obj == uarm)
|
||||
afternmv = Armor_on;
|
||||
else if (obj == uarmh)
|
||||
afternmv = Helmet_on;
|
||||
else if (obj == uarmg)
|
||||
afternmv = Gloves_on;
|
||||
else if (obj == uarmf)
|
||||
afternmv = Boots_on;
|
||||
else if (obj == uarms)
|
||||
afternmv = Shield_on;
|
||||
else if (obj == uarmc)
|
||||
afternmv = Cloak_on;
|
||||
else if (obj == uarmu)
|
||||
afternmv = Shirt_on;
|
||||
else
|
||||
panic("wearing armor not worn as armor? [%08lx]", obj->owornmask);
|
||||
|
||||
delay = -objects[obj->otyp].oc_delay;
|
||||
if (delay) {
|
||||
nomul(delay);
|
||||
multi_reason = "dressing up";
|
||||
if (is_boots(obj))
|
||||
afternmv = Boots_on;
|
||||
if (is_helmet(obj))
|
||||
afternmv = Helmet_on;
|
||||
if (is_gloves(obj))
|
||||
afternmv = Gloves_on;
|
||||
if (obj == uarm)
|
||||
afternmv = Armor_on;
|
||||
nomovemsg = "You finish your dressing maneuver.";
|
||||
} else {
|
||||
if (is_cloak(obj))
|
||||
(void) Cloak_on();
|
||||
if (is_shield(obj))
|
||||
(void) Shield_on();
|
||||
if (is_shirt(obj))
|
||||
(void) Shirt_on();
|
||||
unmul(""); /* call (*aftermv)(), clear it+nomovemsg+multi_reason */
|
||||
on_msg(obj);
|
||||
}
|
||||
context.takeoff.mask = context.takeoff.what = 0L;
|
||||
|
||||
Reference in New Issue
Block a user