From b162f08446fe7bbb09579fc832f1fe77af00bf5a Mon Sep 17 00:00:00 2001 From: tron Date: Tue, 4 Oct 2005 06:34:39 +0000 Subject: [PATCH] (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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathfind.c b/pathfind.c index 449faab0e5..6158280ccb 100644 --- a/pathfind.c +++ b/pathfind.c @@ -708,7 +708,7 @@ start_at: (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;