summaryrefslogtreecommitdiff
path: root/src/ai/default/default.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-24 22:41:50 +0000
committerrubidium <rubidium@openttd.org>2007-05-24 22:41:50 +0000
commit440d723d842db2f246428de2e404091e074ed254 (patch)
tree4ec491716328387ce65a5c1f45b836b6f5f57ce2 /src/ai/default/default.cpp
parentb82676be2a39adeb883f9dd5c67125eec12f2753 (diff)
downloadopenttd-440d723d842db2f246428de2e404091e074ed254.tar.xz
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r--src/ai/default/default.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 60f7efa4a..c865729ff 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -67,7 +67,7 @@ enum {
static TrackBits GetRailTrackStatus(TileIndex tile)
{
- uint32 r = GetTileTrackStatus(tile, TRANSPORT_RAIL);
+ uint32 r = GetTileTrackStatus(tile, TRANSPORT_RAIL, 0);
return (TrackBits)(byte) (r | r >> 8);
}
@@ -1862,7 +1862,7 @@ static bool AiDoFollowTrack(const Player* p)
arpfd.tile2 = p->ai.cur_tile_a;
arpfd.flag = false;
arpfd.count = 0;
- FollowTrack(p->ai.cur_tile_a + TileOffsByDiagDir(p->ai.cur_dir_a), 0x2000 | TRANSPORT_RAIL, (DiagDirection)(p->ai.cur_dir_a ^ 2),
+ FollowTrack(p->ai.cur_tile_a + TileOffsByDiagDir(p->ai.cur_dir_a), 0x2000 | TRANSPORT_RAIL, 0, (DiagDirection)(p->ai.cur_dir_a ^ 2),
(TPFEnumProc*)AiEnumFollowTrack, NULL, &arpfd);
return arpfd.count > 8;
}
@@ -2824,13 +2824,13 @@ static bool AiCheckRoadFinished(Player *p)
tile = TILE_MASK(p->ai.cur_tile_a + TileOffsByDiagDir(dir));
if (IsRoadStopTile(tile) || IsTileDepotType(tile, TRANSPORT_ROAD)) return false;
- bits = GetTileTrackStatus(tile, TRANSPORT_ROAD) & _ai_road_table_and[dir];
+ bits = GetTileTrackStatus(tile, TRANSPORT_ROAD, ROADTYPES_ROAD) & _ai_road_table_and[dir];
if (bits == 0) return false;
are.best_dist = (uint)-1;
for_each_bit(i, bits) {
- FollowTrack(tile, 0x3000 | TRANSPORT_ROAD, (DiagDirection)_dir_by_track[i], (TPFEnumProc*)AiEnumFollowRoad, NULL, &are);
+ FollowTrack(tile, 0x3000 | TRANSPORT_ROAD, ROADTYPES_ROAD, (DiagDirection)_dir_by_track[i], (TPFEnumProc*)AiEnumFollowRoad, NULL, &are);
}
if (DistanceManhattan(tile, are.dest) <= are.best_dist) return false;