Fix couple cases of unhiding monsters

Hidden monster might be forced to move to a location where it
can't hide, perhaps because it's mostly surrounded by other monsters.

Hidden monster in a pit under items, getting hit by a rolling boulder,
the boulder will fill the pit burying the items, making the monster
unable to hide there.
This commit is contained in:
Pasi Kallinen
2022-03-04 19:58:17 +02:00
parent 7c2ffaa8c5
commit 7a1db1d0bd
2 changed files with 3 additions and 0 deletions

View File

@@ -1908,6 +1908,7 @@ bury_objs(int x, int y)
/* don't expect any engravings here, but just in case */
del_engr_at(x, y);
newsym(x, y);
maybe_unhide_at(x, y);
if (costly && loss) {
You("owe %s %ld %s for burying merchandise.", shkname(shkp), loss,

View File

@@ -1421,6 +1421,8 @@ m_move(register struct monst* mtmp, register int after)
if (mtmp->wormno)
worm_move(mtmp);
maybe_unhide_at(mtmp->mx, mtmp->my);
for (j = MTSZ - 1; j > 0; j--)
mtmp->mtrack[j] = mtmp->mtrack[j - 1];
mtmp->mtrack[0].x = omx;