Fix travel occasionally walking you into pools

This was a bug introduced post-3.6.0 in commit 9a2eb370e7
This commit is contained in:
Pasi Kallinen
2016-05-31 20:41:35 +03:00
parent d41e097ea8
commit e138a4b069

View 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);