From: Pasi Kallinen Date: Tue, 31 May 2016 17:41:35 +0000 (+0300) Subject: Fix travel occasionally walking you into pools X-Git-Tag: NetHack-3.6.1_RC01~717 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e138a4b069bba40311ce818a650bfc81d0556ee0;p=nethack Fix travel occasionally walking you into pools This was a bug introduced post-3.6.0 in commit 9a2eb370e704 --- diff --git a/src/hack.c b/src/hack.c index 5c87a2c5e..716958f19 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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);