Review conversion for speed property
With road vehicles I get 60 km/h (NML) --> 57 km/h (OpenTTD), 80 km/h (NML) --> 77 km/h (OpenTTD). See for example the trams in OpenGFX+ Vehicles
Fix #1629: change the value written for the speed property to that the displayed value in OpenTTD matches the original value
#2 Updated by Hirundo almost 9 years ago
Rounding was improved recently (nearest instead of floor) for all units except speed:
#3 Updated by Hirundo over 8 years ago
- Target version set to 0.2.0
I noticed this also, when coding the train example.
We should trace all (rounding) steps between the value entered in NML and the value displayed on screen and then basically do as follows:
while nml_value_to_screen(val) < wanted_val: val += 1
if nml_value_to_screen(val) != wanted_val: warn("we're sorry, rounding is just really messed up")
where nml_value_to_screen(val) replicates all rounding steps.