From: PatR Date: Sun, 4 Jun 2017 03:34:03 +0000 (-0700) Subject: 'A' interruption X-Git-Tag: NetHack-3.6.1_RC01~482 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50e5047855f6d946e309500e78771c05d617390c;p=nethack 'A' interruption Extend the 'A' blindfold fix from three weeks ago to cover weapons too. This might fix the problem being caught via curse(NULL) when using 'A' to remove multiple items. The blindfold bug was straight- forward since it was requiring two turns but not checking for loss of blindfold when interrupted by theft. Weapon/alt-weapon/quiver each only need one turn so I'm not sure what's really happening to trigger problems for them. --- diff --git a/src/do_wear.c b/src/do_wear.c index e60df04dc..197e69e80 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1494545163 2017/05/11 23:26:03 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.95 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1496547229 2017/06/04 03:33:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.96 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1241,6 +1241,12 @@ struct obj *otmp; result = (what == RIGHT_RING); else if (otmp == ublindf) result = (what == WORN_BLINDF); + else if (otmp == uwep) + result = (what == W_WEP); + else if (otmp == uswapwep) + result = (what == W_SWAPWEP); + else if (otmp == uquiver) + result = (what == W_QUIVER); return result; } @@ -1279,6 +1285,12 @@ struct obj *otmp; result = (what == RIGHT_RING); else if (otmp == ublindf) result = (what == WORN_BLINDF); + else if (otmp == uwep) + result = (what == W_WEP); + else if (otmp == uswapwep) + result = (what == W_SWAPWEP); + else if (otmp == uquiver) + result = (what == W_QUIVER); return result; } @@ -1323,7 +1335,7 @@ struct obj *stolenobj; /* no message if stolenobj is already being doffing */ cancel_don(); /* don't want _on() or _off() being called by unmul() since the on or off action isn't completing */ - afternmv = 0; + afternmv = (int NDECL((*))) 0; if (putting_on || otmp != stolenobj) { Sprintf(buf, "You stop %s %s.", putting_on ? "putting on" : "taking off",