(svn r3908) Fix last commit (I'm saying that way too often *sigh*) (Pointed out by Celestar)

This commit is contained in:
tron 2006-03-16 15:28:44 +00:00
parent 6e988259a4
commit 7bd2b37fe7

11
npf.c
View File

@ -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);
}