diff options
author | celestar <celestar@openttd.org> | 2006-04-03 09:07:21 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-03 09:07:21 +0000 |
commit | cc87f682b9cd9c25ee58cec1b63792e4ef786aa9 (patch) | |
tree | e106242c0ac31fc61254791e0f6fcfe95db2baad /vehicle.c | |
parent | 3aa1e38be6e0a3c01346fe4db1bb92b148d0f2a9 (diff) | |
download | openttd-cc87f682b9cd9c25ee58cec1b63792e4ef786aa9.tar.xz |
(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1728,7 +1728,10 @@ static void MaybeReplaceVehicle(Vehicle *v) * If it's not a train, the value is unused * round up to the length of the tiles used for the train instead of the train length instead * Useful when newGRF uses custom length */ - uint16 old_total_length = (v->type == VEH_Train) ? ((v->u.rail.cached_total_length + 15 )/ 16)* 16 : -1; + uint16 old_total_length = (v->type == VEH_Train ? + (v->u.rail.cached_total_length + TILE_SIZE - 1) / TILE_SIZE * TILE_SIZE : + -1 + ); _current_player = v->owner; |