From 1179bb964c39b72a779d04329b476801a3d54bf6 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 4 Sep 2008 20:21:06 +0000 Subject: [PATCH] monsters putting on shirts From the newsgroup: code intended to prevent a monster who's wearing a suit from putting on a shirt didn't work due to faulty logic. --- doc/fixes34.4 | 1 + src/worn.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 492c4b37a..990092552 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -373,6 +373,7 @@ lit south wall of C quest leader's room contained dark gap at secret door spot archeologist shouldn't start with sling skill by carrying slingable touchstone ensure current_fruit gets set to the correct index when setting fruit option to existing entry whose fid is not the highest +monsters already wearing suits can't put on shirts Platform- and/or Interface-Specific Fixes diff --git a/src/worn.c b/src/worn.c index d1be7c577..fa924bd5e 100644 --- a/src/worn.c +++ b/src/worn.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)worn.c 3.5 2007/02/22 */ +/* SCCS Id: @(#)worn.c 3.5 2008/09/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -442,7 +442,7 @@ boolean creation; m_dowear_type(mon, W_AMUL, creation, FALSE); #ifdef TOURIST /* can't put on shirt if already wearing suit */ - if (!cantweararm(mon->data) || (mon->misc_worn_check & W_ARM)) + if (!cantweararm(mon->data) && !(mon->misc_worn_check & W_ARM)) m_dowear_type(mon, W_ARMU, creation, FALSE); #endif /* treating small as a special case allows