From: nethack.rankin Date: Fri, 26 Sep 2003 10:27:36 +0000 (+0000) Subject: animation of wielded statue X-Git-Tag: MOVE2GIT~1751 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0288c5321a4817b542476132d6b75450c1315e7d;p=nethack animation of wielded statue Fix the reported bug of problems after casting stone-to-flesh spell on self while wielding a statue. Pointers for worn items weren't kept in sync and various potential symptoms could occur (most easily visible one being that ')' falsely reported the no longer existing statue as still wielded; report stated that one crash was observed). This bug predates 3.4.2 and was probably present ever since stone-to-flesh got introduced. --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index 4a998e193..93218facd 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -31,6 +31,7 @@ manes are nonliving poles and grappling hook worked thru walls when wearing Eyes of the Overworld more tweaks to fog cloud behavior when dismounting by choice and unimpaired, try not to land on a boulder +casting stone-to-flesh on self while wielding a statue caused problems Platform- and/or Interface-Specific Fixes diff --git a/src/trap.c b/src/trap.c index bbbbfb5b6..3521f6850 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)trap.c 3.4 2003/05/25 */ +/* SCCS Id: @(#)trap.c 3.4 2003/09/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -446,6 +446,9 @@ int *fail_reason; return (struct monst *)0; } + /* in case statue is wielded and hero zaps stone-to-flesh at self */ + if (statue->owornmask) remove_worn_item(statue, TRUE); + /* allow statues to be of a specific gender */ if (statue->spe & STATUE_MALE) mon->female = FALSE; @@ -461,6 +464,7 @@ int *fail_reason; } m_dowear(mon, TRUE); delobj(statue); + /* mimic statue becomes seen mimic; other hiders won't be hidden */ if (mon->m_ap_type) seemimic(mon); else mon->mundetected = FALSE;