# HG changeset patch # User matthijs # Date 2005-04-11 12:08:09 # Node ID bc2e4696dafbb6b790824127da8dd59658a6a52a # Parent ed9934dcc719e3dafdcd287f3ad8ebe03519fed1 (svn r2179) - Fix: [ 1121437, 1114228 ] Vehicles not entering depots for auto servicing. diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -1324,7 +1324,11 @@ static TrainFindDepotData FindClosestTra 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