summaryrefslogtreecommitdiff
path: root/pathfind.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-04 06:34:39 +0000
committertron <tron@openttd.org>2005-10-04 06:34:39 +0000
commit8bd4a63c4753d9809f957b982d873e04686ce46a (patch)
tree93c6a01808ea1a2546a61b9990f551fe3e060da9 /pathfind.c
parent01559c99b152f4a685754663b087a7de7812b775 (diff)
downloadopenttd-8bd4a63c4753d9809f957b982d873e04686ce46a.tar.xz
(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
Diffstat (limited to 'pathfind.c')
-rw-r--r--pathfind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathfind.c b/pathfind.c
index 449faab0e..6158280cc 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;