1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 16:09:10 +00:00

Fix: Tractive effort was slightly too high as per NewGRF spec. (#6785)

This commit is contained in:
2018-05-19 22:05:51 +01:00
committed by GitHub
parent 8a7de36463
commit cad47bbefe

View File

@@ -58,8 +58,8 @@ void GroundVehicle<T, Type>::PowerChanged()
this->gcache.cached_air_drag = air_drag + 3 * air_drag * number_of_parts / 20;
max_te *= 10000; // Tractive effort in (tonnes * 1000 * 10 =) N.
max_te /= 256; // Tractive effort is a [0-255] coefficient.
max_te *= 9800; // 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. */
if (total_power == 0) this->vehstatus |= VS_STOPPED;