From: Pasi Kallinen Date: Tue, 26 Jul 2022 19:53:57 +0000 (+0300) Subject: Fix monster hiding under consumed candle X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0774e0da4ead7e1373a2544f558044eb85d015e;p=nethack Fix monster hiding under consumed candle --- diff --git a/src/timeout.c b/src/timeout.c index 82df30c62..096e20b27 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1240,12 +1240,18 @@ burn_object(anything *arg, long timeout) obj->spe = 0; /* no more candles */ obj->owt = weight(obj); } else if (Is_candle(obj) || obj->otyp == POT_OIL) { + struct monst *mtmp = NULL; + + if (obj->where == OBJ_FLOOR) + mtmp = m_at(obj->ox, obj->oy); /* get rid of candles and burning oil potions; we know this object isn't carried by hero, nor is it migrating */ obj_extract_self(obj); obfree(obj, (struct obj *) 0); obj = (struct obj *) 0; + if (mtmp) + maybe_unhide_at(mtmp->mx, mtmp->my); } } else {