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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user