Mercurial > hg > openttd
changeset 3611:aeec8e5da030 draft
(svn r4506) -Fix: (FS#95) Use the tile hash when pathfinding to a depot. Eats a tiny bit of performance, but the likelihood that the depot is found is greatly increased
author | celestar <celestar@openttd.org> |
---|---|
date | Fri, 21 Apr 2006 20:08:25 +0000 |
parents | b3d1c300d786 |
children | 4db4e85bdf80 |
files | roadveh_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -1110,7 +1110,7 @@ if (best_track == -1) best_track = i; // in case we don't find the path, just pick a track frd.maxtracklen = (uint)-1; frd.mindist = (uint)-1; - FollowTrack(tile, 0x3000 | TRANSPORT_ROAD, _road_pf_directions[i], EnumRoadTrackFindDist, NULL, &frd); + FollowTrack(tile, 0x2000 | TRANSPORT_ROAD, _road_pf_directions[i], EnumRoadTrackFindDist, NULL, &frd); if (frd.mindist < best_dist || (frd.mindist==best_dist && frd.maxtracklen < best_maxlen)) { best_dist = frd.mindist;