(svn r4930) - Backport from trunk (r4859): 0.4
authorDarkvater
Sat, 20 May 2006 18:43:59 +0000
branch0.4
changeset 10021 d239446c3e6e
parent 10020 22c160546905
child 10022 9cb1a8fd9155
(svn r4930) - Backport from trunk (r4859):
Fix issue with train pathfinding over level crossings.
pathfind.c
--- a/pathfind.c	Sat May 20 18:41:11 2006 +0000
+++ b/pathfind.c	Sat May 20 18:43:59 2006 +0000
@@ -766,8 +766,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, GB(_m[tile].m4, 0, 4))) ||
-				      !HASBIT(tpf->railtypes, GetRailType(tile))) {
+				if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GB(_m[tile].m4, 0, 4)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
 					bits = 0;
 					break;
 				}