diff options
author | rubidium <rubidium@openttd.org> | 2007-05-24 22:41:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-24 22:41:50 +0000 |
commit | 821e58ac9514f7fcd43e01115c4dc2a09b4ee45f (patch) | |
tree | 4ec491716328387ce65a5c1f45b836b6f5f57ce2 /src/ai/default/default.cpp | |
parent | d0a39a231a6c459a85cabb72fc7d4de8a24d9c93 (diff) | |
download | openttd-821e58ac9514f7fcd43e01115c4dc2a09b4ee45f.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.cpp | 8 |
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; |