(svn r3012) Extract the correct bits when checking if it's a road or rail tunnel; this is not flagged as fix, because it accidently worked
authortron
Tue, 04 Oct 2005 06:34:39 +0000
changeset 2486 f02260ccd668
parent 2485 fd92a70a064a
child 2487 be510f15d36f
(svn r3012) Extract the correct bits when checking if it's a road or rail tunnel; this is not flagged as fix, because it accidently worked
pathfind.c
--- a/pathfind.c	Mon Oct 03 22:16:30 2005 +0000
+++ b/pathfind.c	Tue Oct 04 06:34:39 2005 +0000
@@ -708,7 +708,7 @@
 				(uint)(_m[tile].m5 & 3) != (direction ^ 2)) {
 				/* This is a tunnel tile */
 				/* We are not just driving out of the tunnel */
-				if ( (uint)(_m[tile].m5 & 3) != direction || ((_m[tile].m5>>1)&6) != tpf->tracktype)
+				if ( (uint)(_m[tile].m5 & 3) != direction || GB(_m[tile].m5, 2, 2) != tpf->tracktype)
 					/* We are not driving into the tunnel, or it
 					 * is an invalid tunnel */
 					continue;