Fix teleported eel hiding in dry land

This commit is contained in:
Pasi Kallinen
2023-01-29 14:25:01 +02:00
parent 7c2c692ee5
commit 394a46ab13
+5 -5
View File
@@ -4067,18 +4067,18 @@ restrap(struct monst *mtmp)
return FALSE; return FALSE;
} }
/* reveal a monster at x,y hiding under an object, /* reveal a hiding monster at x,y, either under nonexistent object,
if there are no objects there */ or an eel out of water. */
void void
maybe_unhide_at(coordxy x, coordxy y) maybe_unhide_at(coordxy x, coordxy y)
{ {
struct monst *mtmp; struct monst *mtmp;
if (OBJ_AT(x, y))
return;
if ((mtmp = m_at(x, y)) == 0 && u_at(x, y)) if ((mtmp = m_at(x, y)) == 0 && u_at(x, y))
mtmp = &gy.youmonst; mtmp = &gy.youmonst;
if (mtmp && mtmp->mundetected && hides_under(mtmp->data)) if (mtmp && mtmp->mundetected
&& ((hides_under(mtmp->data) && !OBJ_AT(x, y))
|| (mtmp->data->mlet == S_EEL && !is_pool(x, y))))
(void) hideunder(mtmp); (void) hideunder(mtmp);
} }