summaryrefslogtreecommitdiff
path: root/pathfind.c
diff options
context:
space:
mode:
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 3e2b3f31f..ae5f32ca6 100644
--- a/pathfind.c
+++ b/pathfind.c
@@ -756,7 +756,7 @@ start_at:
/* Check the rail type only if the train is *NOT* on top of a bridge. */
if (!(IsBridgeTile(tile) && IsBridgeMiddle(tile) && GetBridgeAxis(tile) == DiagDirToAxis(direction))) {
- if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
+ if (!HASBIT(tpf->railtypes, IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile))) {
bits = 0;
break;
}