]> granicus.if.org Git - nethack/commit
yet another pass at 'A' bugs
authorPatR <rankin@nethack.org>
Thu, 8 Jun 2017 22:05:24 +0000 (15:05 -0700)
committerPatR <rankin@nethack.org>
Thu, 8 Jun 2017 22:05:24 +0000 (15:05 -0700)
commit743d3a1eb59d7fffe0a1bb3a9afd2576d411d9bf
treef762bb6538e7615d702a6ba6225238b94b0794fa
parent964fd0fdbd16d22421a2591d8c907a8f5cc1214a
yet another pass at 'A' bugs

I think this finally quashes the "cursed without otmp" issue.
Various ways of destroying wielded weapon used setnotworn() rather
than unwield(), so the previous change to have unwield() clear the
pending W_WEP bit from takeoff.mask wasn't sufficient to prevent
'A' moving on from another item (blindfold--it's the only thing
processed before primary weapon) to weapon which wasn't there any
more.  Also, if weapon was already set in takeoff.what to be
processed on the next move, clearing W_WEP from takeoff.mask wasn't
sufficient either.

Move the previous unwield() 'fix' to setworn() and setnotworn() and
extend it to include cancel_don() if the item being replaced or
removed is in progress or scheduled for next.  (Most of the time,
remove_worn_item() has already done that before setworn() or
setnotworn() is called.)
doc/fixes36.1
include/extern.h
src/do_wear.c
src/wield.c
src/worn.c