summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/npf.c b/npf.c
index 6965e9e5c..474022a7e 100644
--- a/npf.c
+++ b/npf.c
@@ -486,8 +486,15 @@ static bool VehicleMayEnterTile(Owner owner, TileIndex tile, DiagDirection enter
#endif
if ((IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_RAIL) ||
(IsBridge(tile) && (
- (IsBridgeRamp(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) ||
- (IsBridgeMiddle(tile) && IsTransportUnderBridge(tile) && GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL)
+ (
+ IsBridgeRamp(tile) &&
+ GetBridgeTransportType(tile) == TRANSPORT_RAIL
+ ) || (
+ IsBridgeMiddle(tile) &&
+ IsTransportUnderBridge(tile) &&
+ GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL &&
+ GetBridgeAxis(tile) != DiagDirToAxis(enterdir)
+ )
))) {
return IsTileOwner(tile, owner);
}