diff options
author | frosch <frosch@openttd.org> | 2010-04-18 14:56:05 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-18 14:56:05 +0000 |
commit | 2e90f7f8b975d380c3d544995ef6db9d6c8a86d8 (patch) | |
tree | 90fb0852bd31229b016ca998a8e6c0ce44d699dd /src/aircraft_cmd.cpp | |
parent | 2330851d1dc0650335bc73ec4cfd010f08c55742 (diff) | |
download | openttd-2e90f7f8b975d380c3d544995ef6db9d6c8a86d8.tar.xz |
(svn r19670) -Codechange: Add CeilDiv() and RoundDiv() to simplify integer divisions with rounding.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 4cb96beb4..4e3a1168f 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1061,7 +1061,7 @@ static bool AircraftController(Aircraft *v) /* Only start lowering when we're sufficiently close for a 1:1 glide */ if (delta >= t) { - z -= ((z - curz) + t - 1) / t; + z -= CeilDiv(z - curz, t); } if (z < curz) z = curz; } |