# HG changeset patch # User matthijs # Date 1113221289 0 # Node ID d004a4d0f6d4c4542477f76f3f7fe734e985c024 # Parent 59570fa0c7c2953b9bec1b1bb38471f3243fc10f (svn r2179) - Fix: [ 1121437, 1114228 ] Vehicles not entering depots for auto servicing. diff -r 59570fa0c7c2 -r d004a4d0f6d4 train_cmd.c --- a/train_cmd.c Sun Apr 10 21:54:29 2005 +0000 +++ b/train_cmd.c Mon Apr 11 12:08:09 2005 +0000 @@ -1324,7 +1324,11 @@ 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