summaryrefslogtreecommitdiff
path: root/rail.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-16 13:23:47 +0000
committertron <tron@openttd.org>2006-03-16 13:23:47 +0000
commit35fa516ecb91ecc7af92ada11e3a417e6d19d495 (patch)
treef0848132864040e3b2f253cf198f72bb7077ff62 /rail.c
parent483c8f701829006673a5477a8d1073f29a92f6f9 (diff)
downloadopenttd-35fa516ecb91ecc7af92ada11e3a417e6d19d495.tar.xz
(svn r3905) -Fix: When returning the rail type under a bridge, check if there are rails at all
Diffstat (limited to 'rail.c')
-rw-r--r--rail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rail.c b/rail.c
index 6975b5f93..94532e695 100644
--- a/rail.c
+++ b/rail.c
@@ -133,7 +133,7 @@ RailType GetTileRailType(TileIndex tile, Trackdir trackdir)
if ((_m[tile].m5 & 0xC6) == 0xC0 && ((DiagDirection)(_m[tile].m5 & 0x1)) == (exitdir & 0x1))
type = (_m[tile].m3 >> 4) & RAILTYPE_MASK;
/* under bridge (any type) */
- if ((_m[tile].m5 & 0xC0) == 0xC0 && (_m[tile].m5 & 0x1U) != (exitdir & 0x1))
+ if ((_m[tile].m5 & 0xF8) == 0xE0 && (_m[tile].m5 & 0x1U) != (exitdir & 0x1))
type = _m[tile].m3 & RAILTYPE_MASK;
break;
default: