Change: Units-system can convert from N to kN, don't preconvert.

This allows force to passed as is and avoid premature rounding.

The AI function "GetMaxTractiveEffort" still needs to return kN to avoid breaking the API.
This commit is contained in:
Peter Nelson
2023-05-08 23:10:14 +01:00
committed by Michael Lutz
parent e2f583a34f
commit bf9caa425b
4 changed files with 7 additions and 7 deletions

View File

@@ -2498,7 +2498,7 @@ struct VehicleDetailsWindow : Window {
SetDParam(2, PackVelocity(v->GetDisplayMaxSpeed(), v->type));
SetDParam(1, gcache->cached_power);
SetDParam(0, gcache->cached_weight);
SetDParam(3, gcache->cached_max_te / 1000);
SetDParam(3, gcache->cached_max_te);
if (v->type == VEH_TRAIN && (_settings_game.vehicle.train_acceleration_model == AM_ORIGINAL ||
GetRailTypeInfo(Train::From(v)->railtype)->acceleration_type == 2)) {
string = STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED;