# HG changeset patch # User KUDr # Date 2006-08-27 07:04:14 # Node ID dd3a8e5ed49b5a90abbbf7b2b0e555235f1445f0 # Parent 071700f4fb71de05c639e810b61241acedbb26f8 (svn r6163) -Codechange: distance rounded up (correction of r6162) diff --git a/yapf/yapf_road.cpp b/yapf/yapf_road.cpp --- a/yapf/yapf_road.cpp +++ b/yapf/yapf_road.cpp @@ -421,7 +421,7 @@ uint YapfRoadVehDistanceToTile(const Veh 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; }