]> granicus.if.org Git - nethack/commitdiff
Never route a travel path through boulders in Sokoban
authorPasi Kallinen <paxed@alt.org>
Tue, 5 Jan 2016 23:04:56 +0000 (01:04 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 5 Jan 2016 23:05:22 +0000 (01:05 +0200)
Change via Dynahack by Tung Nguyen

src/hack.c

index 3f651467890605ccbc3ae6c663ab2412c850396b..6305ad1e70215b1a7602979b564e6ed658ce7a8a 100644 (file)
@@ -827,6 +827,9 @@ int mode;
         } else if (mode == TEST_TRAV) {
             struct obj *obj;
 
+            /* never travel through boulders in Sokoban */
+            if (Sokoban) return FALSE;
+
             /* don't pick two boulders in a row, unless there's a way thru */
             if (sobj_at(BOULDER, ux, uy) && !Sokoban) {
                 if (!Passes_walls