Fix boulder over a hole or a pit dug by a monster

When a monster digs down and creates a pit or a hole,
drop the boulder at the location into it.
This commit is contained in:
Pasi Kallinen
2024-05-28 18:31:12 +03:00
parent 800b3b4b4b
commit 2ebbd13f79
2 changed files with 4 additions and 1 deletions

View File

@@ -3819,13 +3819,14 @@ float_up(void)
return;
}
/* a boulder fills a pit or a hole at x,y */
void
fill_pit(coordxy x, coordxy y)
{
struct obj *otmp;
struct trap *t;
if ((t = t_at(x, y)) != 0 && is_pit(t->ttyp)
if ((t = t_at(x, y)) != 0 && (is_pit(t->ttyp) || is_hole(t->ttyp))
&& (otmp = sobj_at(BOULDER, x, y)) != 0) {
obj_extract_self(otmp);
(void) flooreffects(otmp, x, y, "settle");