From c6d488fb8d0f95bdefcf27f63e7f58fb14f2ecce Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 21 May 2004 21:33:19 +0000 Subject: [PATCH] U1041 - monster hidden under a corpse not displayed immediately when it rots There was already code to ensure that if a hidden monster moved, it would no longer be hidden. However, if the monster is asleep or whatever under a rotting corpse, when the corpse rotted away, the monster would not immediately become detected. Add a check to the rot code before the newsym. --- doc/fixes35.0 | 2 ++ src/dig.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 106aeae16..924437930 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -65,6 +65,8 @@ kicked objects do not slide when on the air or water levels when a giant carrying a boulder dies in a pit, ensure that the corpse is buried under the filled pit when blind and levitating > shouldn't say "stairs" if player has not seen them +a slow-moving monster hidden under a rotting corpse was not immediately + displayed when the corpse rotted away Platform- and/or Interface-Specific Fixes diff --git a/src/dig.c b/src/dig.c index 56c36dfc5..3931ba02f 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1556,8 +1556,16 @@ long timeout; /* unused */ } } rot_organic(arg, timeout); - if (on_floor) newsym(x, y); - else if (in_invent) update_inventory(); + if (on_floor) { + struct monst *mtmp = m_at(x, y); + + /* a hiding monster may be exposed */ + if (mtmp && !OBJ_AT(x, y) && + mtmp->mundetected && hides_under(mtmp->data)) { + mtmp->mundetected = 0; + } + newsym(x, y); + } else if (in_invent) update_inventory(); } #if 0 -- 2.50.1