From 2f9d711237d010430258fec15c61a6826e7eb2a2 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 31 May 2007 01:42:48 +0000 Subject: [PATCH] fix #H363 - reviving corpses of hiding monsters (trunk only) From a bug report, reviving a snake corpse produced a snake monster which was hidden under nothing--it hid under its own corpse and wasn't revealed when that corpse got used up. Rather than fiddling with sequencing to remove the corpse before making the monster, force any monster who revives in hidden state to unhide. --- doc/fixes35.0 | 2 ++ src/zap.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 57ce2f6be..5b5df3ded 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -239,6 +239,8 @@ attacking via applied polearm now honors the "confirm" option engulfer under influence of conflict or confusion could swallow monster at water/lava/trap spot and not be affected by destination til next move unicorn horn restoration no longer overrides sustain ability characteristic +hider monster revived from corpse would start out hidden (even if own corpse + was only object around to hide under) Platform- and/or Interface-Specific Fixes diff --git a/src/zap.c b/src/zap.c index 44ca8112c..9b0d334fd 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)zap.c 3.5 2007/03/30 */ +/* SCCS Id: @(#)zap.c 3.5 2007/05/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -739,6 +739,13 @@ boolean by_hero; } if (!mtmp) return (struct monst *)0; + /* hiders shouldn't already be re-hidden when they revive */ + if (mtmp->mundetected) { + mtmp->mundetected = 0; + newsym(mtmp->mx, mtmp->my); + } + if (mtmp->m_ap_type) seemimic(mtmp); + /* if this is caused by the hero there might be a shop charge */ if (by_hero) { struct monst *shkp = 0;