summaryrefslogtreecommitdiff
path: root/yapf/yapf_road.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapf/yapf_road.cpp')
-rw-r--r--yapf/yapf_road.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/yapf/yapf_road.cpp b/yapf/yapf_road.cpp
index 76bd7abcc..cb6233e0e 100644
--- a/yapf/yapf_road.cpp
+++ b/yapf/yapf_road.cpp
@@ -421,7 +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) / YAPF_TILE_LENGTH;
+ dist = (dist + YAPF_TILE_LENGTH - 1) / YAPF_TILE_LENGTH;
return dist;
}