]> granicus.if.org Git - nethack/commitdiff
rolling boulder hits an unmoving boulder
authorcohrs <cohrs>
Mon, 18 Nov 2002 22:37:38 +0000 (22:37 +0000)
committercohrs <cohrs>
Mon, 18 Nov 2002 22:37:38 +0000 (22:37 +0000)
src/trap.c

index 1b635664915df07f0d6d0ca34599b4044fb91944..a19105ec1a025f02f2d57bef02d206fd03415b6b 100644 (file)
@@ -1333,8 +1333,12 @@ int style;
                    }
                    if (otyp == BOULDER &&
                       (otmp2 = sobj_at(BOULDER, bhitpos.x, bhitpos.y)) != 0) {
-                       char *bmsg =
-                               " as one boulder sets another in motion";
+                       char *bmsg = " as one boulder sets another in motion";
+
+                       if (!isok(bhitpos.x + dx, bhitpos.y + dy) || !dist ||
+                           IS_ROCK(levl[bhitpos.x + dx][bhitpos.y + dy].typ))
+                           bmsg = " as one boulder hits another";
+                           
                        You_hear("a loud crash%s!",
                                cansee(bhitpos.x, bhitpos.y) ? bmsg : "");
                        obj_extract_self(otmp2);