diff options
author | Johannes E. Krause <j.k@eclipso.de> | 2018-09-29 13:26:44 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-09-30 20:45:41 +0200 |
commit | 662dcc3c31bbdbf26b09c74fb29c4286c80de9c4 (patch) | |
tree | 2cdd11a00f2e04325f6c38fe9ce59966a38c2d08 /src/ground_vehicle.cpp | |
parent | 060248a422a02e4ba7e50b0e4cd7dc30eea414fd (diff) | |
download | openttd-662dcc3c31bbdbf26b09c74fb29c4286c80de9c4.tar.xz |
Fix #6920: Make 9.8m/s^2 a common constant for TE-calculation
Diffstat (limited to 'src/ground_vehicle.cpp')
-rw-r--r-- | src/ground_vehicle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp index f8efd8e1a..6fd8d7710 100644 --- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -58,7 +58,7 @@ void GroundVehicle<T, Type>::PowerChanged() this->gcache.cached_air_drag = air_drag + 3 * air_drag * number_of_parts / 20; - max_te *= 9800; // Tractive effort in (tonnes * 1000 * 9.8 =) N. + max_te *= GROUND_ACCELERATION; // Tractive effort in (tonnes * 1000 * 9.8 =) N. max_te /= 256; // Tractive effort is a [0-255] coefficient. if (this->gcache.cached_power != total_power || this->gcache.cached_max_te != max_te) { /* Stop the vehicle if it has no power. */ |