summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-08-14 23:11:59 +0000
committerDarkvater <darkvater@openttd.org>2006-08-14 23:11:59 +0000
commitba2a796403910b96fcb6645b2d828b61a57045f9 (patch)
tree28e607e44793c778fb900e87d302bf0f8bf8becd
parenta35511dc9bc6685d797e146929c221aa50f3780e (diff)
downloadopenttd-ba2a796403910b96fcb6645b2d828b61a57045f9.tar.xz
(svn r5899) - Fix [FS#242]: Multistop not working when using NPF (r5033) (mart3p)
-rw-r--r--roadveh_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 53cddb281..be1c091ac 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1170,7 +1170,7 @@ found_best_track:;
static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile)
{
- uint dist = UINT_MAX;
+ uint dist;
if (_patches.yapf.road_use_yapf) {
// use YAPF
dist = YapfRoadVehDistanceToTile(v, tile);
@@ -1178,7 +1178,6 @@ static uint RoadFindPathToStop(const Vehicle *v, TileIndex tile)
// use NPF
NPFFindStationOrTileData fstd;
byte trackdir = GetVehicleTrackdir(v);
- uint dist = UINT_MAX;
assert(trackdir != 0xFF);
fstd.dest_coords = tile;