summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/npf.c b/npf.c
index 5959ba947..af2bb2745 100644
--- a/npf.c
+++ b/npf.c
@@ -467,8 +467,10 @@ static bool VehicleMayEnterTile(Owner owner, TileIndex tile, DiagDirection enter
switch (GetTileType(tile)) {
case MP_STREET:
/* rail-road crossing : are we looking at the railway part? */
- if (IsLevelCrossing(tile) && GetCrossingTransportType(tile, TrackdirToTrack(DiagdirToDiagTrackdir(enterdir))) == TRANSPORT_RAIL)
+ if (IsLevelCrossing(tile) &&
+ DiagDirToAxis(enterdir) != GetCrossingRoadAxis(tile)) {
return IsTileOwner(tile, owner); /* Railway needs owner check, while the street is public */
+ }
break;
case MP_TUNNELBRIDGE: