summaryrefslogtreecommitdiff
path: root/src/pathfind.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-16 19:30:42 +0000
committersmatz <smatz@openttd.org>2007-12-16 19:30:42 +0000
commitd56a690ba432c3ef483ac7a8072266349f2bfc96 (patch)
tree3d93af5bbe577ea3e66b1184cb89c1a934d6bcda /src/pathfind.cpp
parentcdee7d4cb8541657d99891ee59cb5caab6aaf444 (diff)
downloadopenttd-d56a690ba432c3ef483ac7a8072266349f2bfc96.tar.xz
(svn r11649) -Codechange: some code can be simplified thanks to changes in r11642
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;
}
}