summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-13 11:24:15 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-13 11:24:15 +0000
commit434e5dd4ae4dfc4dc58b03d650425a992908cbcf (patch)
tree67e12938263d55e09918e27e1fec3c2a004a000c
parente9fcaf12279936dfd188b71c5f31ae3e1ff51cc2 (diff)
downloadopenttd-434e5dd4ae4dfc4dc58b03d650425a992908cbcf.tar.xz
(svn r4859) - Pathfinder: fix issue with train pathfinding over level crossings.
-rw-r--r--pathfind.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pathfind.c b/pathfind.c
index 799e23d58..fd27379ad 100644
--- a/pathfind.c
+++ b/pathfind.c
@@ -734,8 +734,7 @@ start_at:
// Check that the tile contains exactly one track
if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
- if ((IsTileType(tile, MP_STREET) && !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile))) ||
- !HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
bits = 0;
break;
}