(svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions

This commit is contained in:
smatz
2008-01-23 14:51:36 +00:00
parent 9515328962
commit 0b888ccc00
8 changed files with 23 additions and 28 deletions

View File

@@ -313,7 +313,7 @@ static void TPFMode1(TrackPathFinder* tpf, TileIndex tile, DiagDirection directi
* entrance :-) */
return;
}
} else {
} else { // IsBridge(tile)
TileIndex tile_end;
if (GetTunnelBridgeDirection(tile) != direction ||
GetTunnelBridgeTransportType(tile) != tpf->tracktype) {
@@ -733,7 +733,7 @@ start_at:
tile = flotr.tile;
/* tile now points to the exit tile of the tunnel */
}
} else {
} else { // IsBridge(tile)
TileIndex tile_end;
if (GetTunnelBridgeDirection(tile) != ReverseDiagDir(direction)) {
/* We are not just leaving the bridge */