]> granicus.if.org Git - nethack/commitdiff
Fix teleported eel hiding in dry land
authorPasi Kallinen <paxed@alt.org>
Sun, 29 Jan 2023 12:25:01 +0000 (14:25 +0200)
committerPasi Kallinen <paxed@alt.org>
Sun, 29 Jan 2023 12:25:01 +0000 (14:25 +0200)
src/mon.c

index a7f45c4f6fc7cea0b421cc141dcc7e3d1b431de1..718b4def44266787ae7bb84ec99291787dac793c 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -4067,18 +4067,18 @@ restrap(struct monst *mtmp)
     return FALSE;
 }
 
-/* reveal a monster at x,y hiding under an object,
-   if there are no objects there */
+/* reveal a hiding monster at x,y, either under nonexistent object,
+   or an eel out of water. */
 void
 maybe_unhide_at(coordxy x, coordxy y)
 {
     struct monst *mtmp;
 
-    if (OBJ_AT(x, y))
-        return;
     if ((mtmp = m_at(x, y)) == 0 && u_at(x, y))
         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);
 }