diff options
author | frosch <frosch@openttd.org> | 2008-12-20 20:26:40 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-12-20 20:26:40 +0000 |
commit | ebf51ffb6bb44a0a8635ae55fb9253ccc26af976 (patch) | |
tree | 8f8fe127b6b06dda9225bda90d1e36949f655887 /src/ai | |
parent | 400626d8821fd7c829ef34981f37b629a8a4347e (diff) | |
download | openttd-ebf51ffb6bb44a0a8635ae55fb9253ccc26af976.tar.xz |
(svn r14707) -Cleanup: Replace an 'int' by 'Trackdir'.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/trolly/pathfinder.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp index ca8b2a635..288ac1660 100644 --- a/src/ai/trolly/pathfinder.cpp +++ b/src/ai/trolly/pathfinder.cpp @@ -121,7 +121,7 @@ AyStar *new_AyStar_AiPathFinder(int max_tiles_around, Ai_PathFinderInfo *PathFin // Set the start node start_node.parent = NULL; - start_node.node.direction = 0; + start_node.node.direction = INVALID_TRACKDIR; start_node.node.user_data[0] = 0; // Now we add all the starting tiles @@ -150,7 +150,7 @@ void clean_AyStar_AiPathFinder(AyStar *aystar, Ai_PathFinderInfo *PathFinderInfo // Set the start node start_node.parent = NULL; - start_node.node.direction = 0; + start_node.node.direction = INVALID_TRACKDIR; start_node.node.user_data[0] = 0; start_node.node.tile = PathFinderInfo->start_tile_tl; @@ -300,7 +300,7 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr // The tile can be connected aystar->neighbours[aystar->num_neighbours].tile = atile; aystar->neighbours[aystar->num_neighbours].user_data[0] = 0; - aystar->neighbours[aystar->num_neighbours++].direction = 0; + aystar->neighbours[aystar->num_neighbours++].direction = INVALID_TRACKDIR; } } @@ -333,7 +333,7 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr // We can build a bridge here.. add him to the neighbours aystar->neighbours[aystar->num_neighbours].tile = new_tile; aystar->neighbours[aystar->num_neighbours].user_data[0] = AI_PATHFINDER_FLAG_BRIDGE + (dir << 8); - aystar->neighbours[aystar->num_neighbours++].direction = 0; + aystar->neighbours[aystar->num_neighbours++].direction = INVALID_TRACKDIR; // We can only have 12 neighbours, and we need 1 left for tunnels if (aystar->num_neighbours == 11) break; } @@ -349,7 +349,7 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr if (CmdSucceeded(ret) && IsInclinedSlope(tileh)) { aystar->neighbours[aystar->num_neighbours].tile = _build_tunnel_endtile; aystar->neighbours[aystar->num_neighbours].user_data[0] = AI_PATHFINDER_FLAG_TUNNEL + (dir << 8); - aystar->neighbours[aystar->num_neighbours++].direction = 0; + aystar->neighbours[aystar->num_neighbours++].direction = INVALID_TRACKDIR; } } } |