(svn r4859) - Pathfinder: fix issue with train pathfinding over level crossings.
authorpeter1138
Sat, 13 May 2006 11:24:15 +0000
changeset 3835 2be2c1d65db7
parent 3834 5209dc0bd96a
child 3836 92600802106e
(svn r4859) - Pathfinder: fix issue with train pathfinding over level crossings.
pathfind.c
--- a/pathfind.c	Fri May 12 23:44:20 2006 +0000
+++ b/pathfind.c	Sat May 13 11:24:15 2006 +0000
@@ -734,8 +734,7 @@
 				// 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;
 				}