summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-08-27 06:52:25 +0000
committerKUDr <kudr@openttd.org>2006-08-27 06:52:25 +0000
commitc279e53f8ea57f0537b1d2ea29aea75e92e454f7 (patch)
tree2175ee2985c507ddca27b2eef352beffd5a6192e
parentd576f799d5331cd22546cc555d210ab21e141fa1 (diff)
downloadopenttd-c279e53f8ea57f0537b1d2ea29aea75e92e454f7.tar.xz
(svn r6162) -Fix: Multistop problem caused by incorrect distance returned by YapfRoadVehDistanceToTile() (by mart3p)
-rw-r--r--yapf/yapf_road.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/yapf/yapf_road.cpp b/yapf/yapf_road.cpp
index 483f82a0f..76bd7abcc 100644
--- a/yapf/yapf_road.cpp
+++ b/yapf/yapf_road.cpp
@@ -421,8 +421,7 @@ uint YapfRoadVehDistanceToTile(const Vehicle* v, TileIndex tile)
uint dist = pfnDistanceToTile(v, tile);
// convert distance to tiles
if (dist != UINT_MAX)
- dist = (dist + 10 - 1) / 10; // TODO: change road YAPF unit from 10 to YAPF_TILE_LENGTH
-
+ dist = (dist + 10 - 1) / YAPF_TILE_LENGTH;
return dist;
}