src/ai/trolly/trolly.cpp
changeset 8563 13b1a41e46f1
parent 8556 ce8d86cc14d2
child 8614 4c67a883c4c4
--- a/src/ai/trolly/trolly.cpp	Thu Feb 14 15:13:36 2008 +0000
+++ b/src/ai/trolly/trolly.cpp	Thu Feb 14 15:59:16 2008 +0000
@@ -801,8 +801,7 @@
 		for (j = DIAGDIR_BEGIN; j < DIAGDIR_END; j++) {
 			TileIndex t = tile + TileOffsByDiagDir(j);
 
-			if (IsTileType(t, MP_ROAD) &&
-					GetRoadTileType(t) == ROAD_TILE_DEPOT &&
+			if (IsRoadDepotTile(t) &&
 					IsTileOwner(t, _current_player) &&
 					GetRoadDepotDirection(t) == ReverseDiagDir(j)) {
 				_players_ainew[p->index].depot_tile = t;
@@ -1102,7 +1101,7 @@
 	CommandCost res;
 	assert(_players_ainew[p->index].state == AI_STATE_BUILD_DEPOT);
 
-	if (IsTileType(_players_ainew[p->index].depot_tile, MP_ROAD) && GetRoadTileType(_players_ainew[p->index].depot_tile) == ROAD_TILE_DEPOT) {
+	if (IsRoadDepotTile(_players_ainew[p->index].depot_tile)) {
 		if (IsTileOwner(_players_ainew[p->index].depot_tile, _current_player)) {
 			// The depot is already built
 			_players_ainew[p->index].state = AI_STATE_BUILD_VEHICLE;