summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-16 15:28:44 +0000
committertron <tron@openttd.org>2006-03-16 15:28:44 +0000
commit83ba8bdf776f8fd820e51068097567841fc4bdf4 (patch)
tree2251f0b5f29d319a7e1f5998e48afa88c7bce90f
parentb8da06ddb11f234451864e0b454163ebb546e4cd (diff)
downloadopenttd-83ba8bdf776f8fd820e51068097567841fc4bdf4.tar.xz
(svn r3908) Fix last commit (I'm saying that way too often *sigh*) (Pointed out by Celestar)
-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);
}