]> granicus.if.org Git - nethack/commitdiff
Fix monster hiding under candle burning away
authorPasi Kallinen <paxed@alt.org>
Fri, 8 Jul 2022 10:39:19 +0000 (13:39 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 8 Jul 2022 10:39:28 +0000 (13:39 +0300)
Reveal the monster when the candle it was hiding under burned away.

src/timeout.c

index 998e1388feea26f629d0075cecda710960b24d97..378785e0f8039fa0cdda922702819928f1b191f4 100644 (file)
@@ -1462,11 +1462,15 @@ burn_object(anything *arg, long timeout)
                 if (carried(obj)) {
                     useupall(obj);
                 } else {
+                    boolean onfloor = (obj->where == OBJ_FLOOR);
+
                     /* clear migrating obj's destination code
                        so obfree won't think this item is worn */
                     if (obj->where == OBJ_MIGRATING)
                         obj->owornmask = 0L;
                     obj_extract_self(obj);
+                    if (onfloor)
+                        maybe_unhide_at(x, y);
                     obfree(obj, (struct obj *) 0);
                 }
                 obj = (struct obj *) 0;