diff options
author | smatz <smatz@openttd.org> | 2007-12-16 15:38:51 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-16 15:38:51 +0000 |
commit | 926fe5c9e9e9fc3fd1b8ed9779812d54ee128adf (patch) | |
tree | 3adebd2b8c9a10a6d993c67b0b5920b3598f2bce /src/ai/trolly | |
parent | 8ce9c5f29b52cc9625bdda47594b4fad9e3dd242 (diff) | |
download | openttd-926fe5c9e9e9fc3fd1b8ed9779812d54ee128adf.tar.xz |
(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h
Diffstat (limited to 'src/ai/trolly')
-rw-r--r-- | src/ai/trolly/pathfinder.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp index bd243dd31..33383a560 100644 --- a/src/ai/trolly/pathfinder.cpp +++ b/src/ai/trolly/pathfinder.cpp @@ -12,8 +12,10 @@ #include "../../depot.h" #include "../../tunnel_map.h" #include "../../bridge.h" +#include "../../tunnelbridge_map.h" #include "../ai.h" + #define TEST_STATION_NO_DIR 0xFF // Tests if a station can be build on the given spot @@ -44,8 +46,8 @@ static bool IsRoad(TileIndex tile) // MP_ROAD, but not a road depot? (IsTileType(tile, MP_ROAD) && !IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_TUNNELBRIDGE) && ( - (IsTunnel(tile) && GetTunnelTransportType(tile) == TRANSPORT_ROAD) || - (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_ROAD) + (IsTunnel(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) || + (IsBridge(tile) && GetTunnelBridgeTransportType(tile) == TRANSPORT_ROAD) )); } @@ -235,9 +237,9 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr if (!PathFinderInfo->rail_or_road && IsRoad(atile)) { if (IsTileType(atile, MP_TUNNELBRIDGE)) { if (IsTunnel(atile)) { - if (GetTunnelDirection(atile) != i) continue; + if (GetTunnelBridgeDirection(atile) != i) continue; } else { - if (GetBridgeRampDirection(atile) != i) continue; + if (GetTunnelBridgeDirection(atile) != i) continue; } } } |