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/engine.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/engine.cpp')
-rw-r--r-- | src/engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index ac2e8df0e..cd96a149f 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -431,9 +431,9 @@ uint Engine::GetDisplayMaxTractiveEffort() const /* Only trains and road vehicles have 'tractive effort'. */ switch (this->type) { case VEH_TRAIN: - return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->u.rail.tractive_effort)) / 256; + return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_TRAIN_TRACTIVE_EFFORT, this->u.rail.tractive_effort)) / 256 / 1000; case VEH_ROAD: - return (10 * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->u.road.tractive_effort)) / 256; + return (GROUND_ACCELERATION * this->GetDisplayWeight() * GetEngineProperty(this->index, PROP_ROADVEH_TRACTIVE_EFFORT, this->u.road.tractive_effort)) / 256 / 1000; default: NOT_REACHED(); } |