summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-12-20 20:26:40 +0000
committerfrosch <frosch@openttd.org>2008-12-20 20:26:40 +0000
commitee9fc4e49ba226772af2e3c2b7e73d0cf921d42e (patch)
tree8f8fe127b6b06dda9225bda90d1e36949f655887 /src/ai
parent8b4659a7aca6d094cfd367fc665fc8373f00914f (diff)
downloadopenttd-ee9fc4e49ba226772af2e3c2b7e73d0cf921d42e.tar.xz
(svn r14707) -Cleanup: Replace an 'int' by 'Trackdir'.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/trolly/pathfinder.cpp10
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;
}
}
}