]> granicus.if.org Git - nethack/commitdiff
Fix travel occasionally walking you into pools
authorPasi Kallinen <paxed@alt.org>
Tue, 31 May 2016 17:41:35 +0000 (20:41 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 31 May 2016 17:41:39 +0000 (20:41 +0300)
This was a bug introduced post-3.6.0 in commit 9a2eb370e704

src/hack.c

index 5c87a2c5e31fcab78304c48caa5156e8ba63fcf2..716958f1989fd9f09524fe82796c70aa44d8c47b 100644 (file)
@@ -791,8 +791,7 @@ int mode;
     /* Pick travel path that does not require crossing a trap.
      * Avoid water and lava using the usual running rules.
      * (but not u.ux/u.uy because findtravelpath walks toward u.ux/u.uy) */
-    if (context.run == 8
-        && (mode == TEST_MOVE || mode == TEST_TRAP)
+    if (context.run == 8 && (mode != DO_MOVE)
         && (x != u.ux || y != u.uy)) {
         struct trap *t = t_at(x, y);