shrink_glob bug when when glob is totally gone

When a wielded glob shrank away to nothing, an impossible warning:
"obfree: deleting worn obj" would be issued.

If a glob is quivered or wielded or set up as swap weapon when it
shrinks away to nothing, clear the relevant weapon slot before
destroying the glob.

Won't happen for monsters since they never wield globs.  Also won't
happen for migrating objects (which overload obj->owornmask) because
they have to have arrived somewhere in order to have their shrink
timer execute.
This commit is contained in:
PatR
2021-12-10 20:16:30 -08:00
parent 8aa90bdbac
commit ba255875cd
3 changed files with 25 additions and 17 deletions

View File

@@ -923,6 +923,8 @@ if 'showrace' was On and invisible hero couldn't see invisible so didn't see
in wizard mode, a poly'd priest/priestess attempting to polymorph into priest
or priestess in order to rehumanize became a new man or woman instead
because "priest" matched "aligned cleric" rather than the role monster
if a glob which has just shrunk away to nothing was wielded or quivered,
unwield it before destroying it
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support