summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-04-02 13:57:25 +0000
committerfrosch <frosch@openttd.org>2008-04-02 13:57:25 +0000
commit5e5e074a5dc68ed495de3234fda15989db34e23d (patch)
tree870c22ef8f7efe26779dd29c1c614c71b05bb3f2 /src/ai/default
parentb0ee3117803b73a7ce326ad9a1c54dff936c4379 (diff)
downloadopenttd-5e5e074a5dc68ed495de3234fda15989db34e23d.tar.xz
(svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable.
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index cd081973a..7829fa7bf 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -1922,7 +1922,7 @@ static bool AiDoFollowTrack(const Player* p)
arpfd.tile2 = _players_ai[p->index].cur_tile_a;
arpfd.flag = false;
arpfd.count = 0;
- FollowTrack(_players_ai[p->index].cur_tile_a + TileOffsByDiagDir(_players_ai[p->index].cur_dir_a), TRANSPORT_RAIL, 0, ReverseDiagDir(_players_ai[p->index].cur_dir_a),
+ FollowTrack(_players_ai[p->index].cur_tile_a + TileOffsByDiagDir(_players_ai[p->index].cur_dir_a), PATHFIND_FLAGS_NONE, TRANSPORT_RAIL, 0, ReverseDiagDir(_players_ai[p->index].cur_dir_a),
(TPFEnumProc*)AiEnumFollowTrack, NULL, &arpfd);
return arpfd.count > 8;
}
@@ -2897,7 +2897,7 @@ static bool AiCheckRoadFinished(Player *p)
while (bits != TRACKDIR_BIT_NONE) {
Trackdir trackdir = RemoveFirstTrackdir(&bits);
- FollowTrack(tile, 0x1000 | TRANSPORT_ROAD, ROADTYPES_ROAD, TrackdirToExitdir(trackdir), (TPFEnumProc*)AiEnumFollowRoad, NULL, &are);
+ FollowTrack(tile, PATHFIND_FLAGS_DISABLE_TILE_HASH, TRANSPORT_ROAD, ROADTYPES_ROAD, TrackdirToExitdir(trackdir), (TPFEnumProc*)AiEnumFollowRoad, NULL, &are);
}
if (DistanceManhattan(tile, are.dest) <= are.best_dist) return false;