summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpasky <pasky@openttd.org>2005-03-08 00:18:31 +0000
committerpasky <pasky@openttd.org>2005-03-08 00:18:31 +0000
commit2002aaead1f9c32bc9bde991d25d9a3d7d2fe0e2 (patch)
tree5f5061fb91005c8405825758b2c6a29d33f2c9a4
parent26c4e9e931b2a0f369af496dc3af6692f462d5a5 (diff)
downloadopenttd-2002aaead1f9c32bc9bde991d25d9a3d7d2fe0e2.tar.xz
(svn r1957) Compilation fix.
-rw-r--r--npf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/npf.c b/npf.c
index ea9001f1b..3ca44c102 100644
--- a/npf.c
+++ b/npf.c
@@ -179,12 +179,13 @@ int32 NPFCalcStationOrTileHeuristic(AyStar* as, AyStarNode* current, OpenListNod
NPFFoundTargetData* ftd = (NPFFoundTargetData*)as->user_path;
TileIndex from = current->tile;
TileIndex to = fstd->dest_coords;
+ uint dist;
// for train-stations, we are going to aim for the closest station tile
if ((as->user_data[NPF_TYPE] == TRANSPORT_RAIL) && (fstd->station_index != -1))
- to = CalcClosestStationTile(fstd->station_index, from);
+ to = CalcClosestStationTile(fstd->station_index, from);
- uint dist = DistanceManhattan(from, to) * NPF_TILE_LENGTH;
+ dist = DistanceManhattan(from, to) * NPF_TILE_LENGTH;
if (dist < ftd->best_bird_dist) {
ftd->best_bird_dist = dist;