summaryrefslogtreecommitdiff
path: root/src/pathfind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfind.cpp')
-rw-r--r--src/pathfind.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/pathfind.cpp b/src/pathfind.cpp
index 4cefc7125..988c2b737 100644
--- a/src/pathfind.cpp
+++ b/src/pathfind.cpp
@@ -260,16 +260,9 @@ static inline void TPFMode1_NormalCase(TrackPathFinder* tpf, TileIndex tile, Til
/* Check if the new tile is a tunnel or bridge head and that the direction
* and transport type match */
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
- if (IsTunnel(tile)) {
- if (GetTunnelBridgeDirection(tile) != direction ||
- GetTunnelBridgeTransportType(tile) != tpf->tracktype) {
- return;
- }
- } else if (IsBridge(tile)) {
- if (GetTunnelBridgeDirection(tile) != direction ||
- GetTunnelBridgeTransportType(tile) != tpf->tracktype) {
- return;
- }
+ if (GetTunnelBridgeDirection(tile) != direction ||
+ GetTunnelBridgeTransportType(tile) != tpf->tracktype) {
+ return;
}
}