Fix travel occasionally walking you into pools
This was a bug introduced post-3.6.0 in commit 9a2eb370e7
This commit is contained in:
+1
-2
@@ -791,8 +791,7 @@ int mode;
|
|||||||
/* Pick travel path that does not require crossing a trap.
|
/* Pick travel path that does not require crossing a trap.
|
||||||
* Avoid water and lava using the usual running rules.
|
* Avoid water and lava using the usual running rules.
|
||||||
* (but not u.ux/u.uy because findtravelpath walks toward u.ux/u.uy) */
|
* (but not u.ux/u.uy because findtravelpath walks toward u.ux/u.uy) */
|
||||||
if (context.run == 8
|
if (context.run == 8 && (mode != DO_MOVE)
|
||||||
&& (mode == TEST_MOVE || mode == TEST_TRAP)
|
|
||||||
&& (x != u.ux || y != u.uy)) {
|
&& (x != u.ux || y != u.uy)) {
|
||||||
struct trap *t = t_at(x, y);
|
struct trap *t = t_at(x, y);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user