summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp2
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;
}