Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric speed values are still slightly off #147

Closed
Andrew350 opened this issue May 18, 2020 · 2 comments
Closed

Metric speed values are still slightly off #147

Andrew350 opened this issue May 18, 2020 · 2 comments

Comments

@Andrew350
Copy link

Using latest NML and OpenTTD there still seems to be something wrong with the metric speed units as mentioned in issue #74 and supposedly fixed in #75 . MPH works fine but KM/H values appear to be rounded wrong in OpenTTD despite being defined correctly in the NML code.

Unnamed, 01_01_1990#2

To check for yourself, load RattRoads (available on Bananas) and set the grf parameter "speed units" to km/h
Make sure your game setting "speed units" is also set to km/h and start a game
You should see the same result as shown above
Obviously the speeds should be 50 km/h, 60 km/h, 90 km/h, etc. but for some reason they are slightly off.

I also see a similar effect with m/s (but who really uses that anyway?)

@Eddi-z
Copy link
Contributor

Eddi-z commented May 18, 2020

this is a bit tricky to achieve, as not all values are possible to represent, so some rounding has to occur

@FLHerne
Copy link
Contributor

FLHerne commented May 18, 2020

There's specific code to check that the final calculated value (in OTTD's units) converts/rounds back to the input value, and adjust it until it does.

(apparently not working, of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants