equal
deleted
inserted
replaced
113 start_node.node.user_data[0] = 0; |
113 start_node.node.user_data[0] = 0; |
114 |
114 |
115 // Now we add all the starting tiles |
115 // Now we add all the starting tiles |
116 for (x = TileX(PathFinderInfo->start_tile_tl); x <= TileX(PathFinderInfo->start_tile_br); x++) { |
116 for (x = TileX(PathFinderInfo->start_tile_tl); x <= TileX(PathFinderInfo->start_tile_br); x++) { |
117 for (y = TileY(PathFinderInfo->start_tile_tl); y <= TileY(PathFinderInfo->start_tile_br); y++) { |
117 for (y = TileY(PathFinderInfo->start_tile_tl); y <= TileY(PathFinderInfo->start_tile_br); y++) { |
118 start_node.node.tile = TILE_XY(x, y); |
118 start_node.node.tile = TileXY(x, y); |
119 result->addstart(result, &start_node.node, 0); |
119 result->addstart(result, &start_node.node, 0); |
120 } |
120 } |
121 } |
121 } |
122 |
122 |
123 return result; |
123 return result; |
142 start_node.node.tile = PathFinderInfo->start_tile_tl; |
142 start_node.node.tile = PathFinderInfo->start_tile_tl; |
143 |
143 |
144 // Now we add all the starting tiles |
144 // Now we add all the starting tiles |
145 for (x = TileX(PathFinderInfo->start_tile_tl); x <= TileX(PathFinderInfo->start_tile_br); x++) { |
145 for (x = TileX(PathFinderInfo->start_tile_tl); x <= TileX(PathFinderInfo->start_tile_br); x++) { |
146 for (y = TileY(PathFinderInfo->start_tile_tl); y <= TileY(PathFinderInfo->start_tile_br); y++) { |
146 for (y = TileY(PathFinderInfo->start_tile_tl); y <= TileY(PathFinderInfo->start_tile_br); y++) { |
147 if (!(IsTileType(TILE_XY(x, y), MP_CLEAR) || IsTileType(TILE_XY(x, y), MP_TREES))) continue; |
147 if (!(IsTileType(TileXY(x, y), MP_CLEAR) || IsTileType(TileXY(x, y), MP_TREES))) continue; |
148 if (!TestCanBuildStationHere(TILE_XY(x, y), TEST_STATION_NO_DIR)) continue; |
148 if (!TestCanBuildStationHere(TileXY(x, y), TEST_STATION_NO_DIR)) continue; |
149 start_node.node.tile = TILE_XY(x, y); |
149 start_node.node.tile = TileXY(x, y); |
150 aystar->addstart(aystar, &start_node.node, 0); |
150 aystar->addstart(aystar, &start_node.node, 0); |
151 } |
151 } |
152 } |
152 } |
153 } |
153 } |
154 |
154 |