]> granicus.if.org Git - nethack/commitdiff
Fix bz65: Water behaves strangely when hurtling out of air bubble
authorPasi Kallinen <paxed@alt.org>
Fri, 15 Jan 2016 11:47:16 +0000 (13:47 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 15 Jan 2016 11:47:19 +0000 (13:47 +0200)
When levitating on the plane of water, get an unattached iron ball,
and throw it. You'll hurtle in the opposite direction, out of the air
bubble and into water, but don't drown.

src/dothrow.c

index fa02a11868875b00a6976b310d9e67f3235925d8..f9ee2e374127f1676c67734884807c49dbc456d1 100644 (file)
@@ -621,6 +621,12 @@ int x, y;
     newsym(ox, oy);    /* update old position */
     vision_recalc(1);  /* update for new position */
     flush_screen(1);
+
+    if (levl[x][y].typ == WATER && Is_waterlevel(&u.uz)) {
+        drown();
+        return FALSE;
+    }
+
     /* FIXME:
      * Each trap should really trigger on the recoil if
      * it would trigger during normal movement. However,