(svn r1957) Compilation fix.
authorpasky
Tue, 08 Mar 2005 00:18:31 +0000
changeset 1453 a97bad7fc002
parent 1452 a978fdcbca3e
child 1454 ffc16bcbe046
(svn r1957) Compilation fix.
npf.c
--- a/npf.c	Mon Mar 07 23:28:27 2005 +0000
+++ b/npf.c	Tue Mar 08 00:18:31 2005 +0000
@@ -179,12 +179,13 @@
 	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;