diff options
author | matthijs <matthijs@openttd.org> | 2005-04-11 12:08:09 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2005-04-11 12:08:09 +0000 |
commit | b1245a498412608ab9e62b9e5443619b50c75633 (patch) | |
tree | f254c970f78ff1f4fc89d252bbba8d6775dfb0bd | |
parent | 00df5da8eb29e584167296716c10a6d3ce686e82 (diff) | |
download | openttd-b1245a498412608ab9e62b9e5443619b50c75633.tar.xz |
(svn r2179) - Fix: [ 1121437, 1114228 ] Vehicles not entering depots for auto servicing.
-rw-r--r-- | train_cmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c index 198125281..89efa842c 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1324,7 +1324,11 @@ static TrainFindDepotData FindClosestTrainDepot(Vehicle *v) if (ftd.best_bird_dist == 0) { /* Found target */ tfdd.tile = ftd.node.tile; - tfdd.best_length = ftd.best_path_dist; + tfdd.best_length = ftd.best_path_dist / NPF_TILE_LENGTH; + /* Our caller expects a number of tiles, so we just approximate that + * number by this. It might not be completely what we want, but it will + * work for now :-) We can possibly change this when the old pathfinder + * is removed. */ } } else if (!_patches.new_depot_finding) { // search in all directions |