]> granicus.if.org Git - nethack/commitdiff
scatter() vs sinks
authorPatR <rankin@nethack.org>
Sat, 13 Feb 2021 23:15:21 +0000 (15:15 -0800)
committerPatR <rankin@nethack.org>
Sat, 13 Feb 2021 23:15:21 +0000 (15:15 -0800)
Objects shot, thrown, or kicked by the hero or by monsters stop
short if they try to pass over a sink; make objects launched by
an explosion behave similarly.

doc/fixes37.0
src/explode.c

index 9c62b3086d1f339980460ef5ab828e3663d15b36..8e2a912d4409d52c54c1f9a7524fb88bc07509fa 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.450 $ $NHDT-Date: 1613171268 2021/02/12 23:07:48 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.451 $ $NHDT-Date: 1613258116 2021/02/13 23:15:16 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -382,6 +382,7 @@ prevent wish request "death wand" from matching Death monster and producing a
 grammar bit: "you hear a [AEF] note squeak in the distance" (should be "an")
 curses interface failed to honor menu_xxx option settings for menu interaction
 during engraving, spaces were counted instead of non-spaces
+when an explosion scatters objects, make any that fly over sinks stop there
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 615ec3aaf290d15f405a73985a98b82fca271356..5c125c399b2d51b561e74599b086d27c025a218f 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 explode.c       $NHDT-Date: 1596498168 2020/08/03 23:42:48 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.71 $ */
+/* NetHack 3.7 explode.c       $NHDT-Date: 1613258116 2021/02/13 23:15:16 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ */
 /*      Copyright (C) 1990 by Ken Arromdee */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -754,6 +754,8 @@ scatter(int sx, int sy,  /* location of objects to scatter */
                 }
                 stmp->ox = g.bhitpos.x;
                 stmp->oy = g.bhitpos.y;
+                if (IS_SINK(levl[stmp->ox][stmp->oy].typ))
+                    stmp->stopped = TRUE;
             }
         }
     }