Fix monster hiding under candle burning away

Reveal the monster when the candle it was hiding under burned away.
This commit is contained in:
Pasi Kallinen
2022-07-08 13:39:19 +03:00
parent 96f6c52082
commit c4bd9db98c

View 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;