]> granicus.if.org Git - nethack/commitdiff
Flying should not allow monsters to walk on the wall of water
authorPasi Kallinen <paxed@alt.org>
Sun, 13 Feb 2022 15:54:01 +0000 (17:54 +0200)
committerPasi Kallinen <paxed@alt.org>
Sun, 13 Feb 2022 15:54:13 +0000 (17:54 +0200)
Also applies to levitating monsters.

src/mon.c

index 01957a4700a46405dffb06dfccf7dde1079d44e2..0e705a9b401ffc8923f3eae1d5f458ce79bab3d4 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1779,7 +1779,7 @@ mfndpos(
 
     nodiag = NODIAG(mdat - mons);
     wantpool = (mdat->mlet == S_EEL);
-    poolok = ((!Is_waterlevel(&u.uz)
+    poolok = ((!Is_waterlevel(&u.uz) && !(nowtyp != WATER)
                && (is_flyer(mdat) || is_floater(mdat) || is_clinger(mdat)))
               || (is_swimmer(mdat) && !wantpool));
     /* note: floating eye is the only is_floater() so this could be