mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 17:39:09 +00:00
(svn r6159) -Fix: FindClosestTrainDepot hardly ever found a depot with NPF off due to absence of distance-normalization (Rojer)
This commit is contained in:
@@ -1847,7 +1847,8 @@ static bool NtpCallbFindDepot(TileIndex tile, TrainFindDepotData *tfdd, int trac
|
||||
if (IsTileType(tile, MP_RAILWAY) &&
|
||||
IsTileOwner(tile, tfdd->owner) &&
|
||||
IsRailDepot(tile)) {
|
||||
tfdd->best_length = length;
|
||||
/* approximate number of tiles by dividing by DIAG_FACTOR */
|
||||
tfdd->best_length = length / DIAG_FACTOR;
|
||||
tfdd->tile = tile;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user