(svn r1968) - Fix: [NPF] Mixed declarations and statements

pull/155/head
matthijs 20 years ago
parent 05455047a1
commit 82e55eb591

@ -410,6 +410,8 @@ int32 NPFFindDepot(AyStar* as, AyStarNode *node) {
/* Will find a station identified using the NPFFindStationOrTileData */ /* Will find a station identified using the NPFFindStationOrTileData */
int32 NPFFindStationOrTile(AyStar* as, AyStarNode *node) { int32 NPFFindStationOrTile(AyStar* as, AyStarNode *node) {
NPFFindStationOrTileData* fstd = (NPFFindStationOrTileData*)as->user_target;
TileIndex tile = node->tile;
/* See if we checked this before */ /* See if we checked this before */
if (NPFGetFlag(node, NPF_FLAG_TARGET_CHECKED)) if (NPFGetFlag(node, NPF_FLAG_TARGET_CHECKED))
@ -419,8 +421,6 @@ int32 NPFFindStationOrTile(AyStar* as, AyStarNode *node) {
/* If GetNeighbours said we could get here, we assume the station type /* If GetNeighbours said we could get here, we assume the station type
* is correct */ * is correct */
NPFFindStationOrTileData* fstd = (NPFFindStationOrTileData*)as->user_target;
TileIndex tile = node->tile;
if ( if (
(fstd->station_index == -1 && tile == fstd->dest_coords) || /* We've found the tile, or */ (fstd->station_index == -1 && tile == fstd->dest_coords) || /* We've found the tile, or */
(IsTileType(tile, MP_STATION) && _map2[tile] == fstd->station_index) /* the station */ (IsTileType(tile, MP_STATION) && _map2[tile] == fstd->station_index) /* the station */

Loading…
Cancel
Save