summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2006-08-27 07:04:14 +0000
committerKUDr <KUDr@openttd.org>2006-08-27 07:04:14 +0000
commitb46b818446d8b1e3784a971c47b8413942a41b56 (patch)
tree3e4c7779214da36e738d3c352d7f6d60337f2342
parentbe594eff6e1f99b86698bd22c46acdc153bfc247 (diff)
downloadopenttd-b46b818446d8b1e3784a971c47b8413942a41b56.tar.xz
(svn r6163) -Codechange: distance rounded up (correction of r6162)
-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;
}