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

Make the position accurate to the decimal point #55

Open
mhtvsSFrpHdE opened this issue Sep 16, 2019 · 2 comments
Open

Make the position accurate to the decimal point #55

mhtvsSFrpHdE opened this issue Sep 16, 2019 · 2 comments

Comments

@mhtvsSFrpHdE
Copy link

The stations saved as int numbers when create and save stations to disk.
But in game I identified when stand in a block center,
the position is violation to the common sense,
that is 0.5, height, 0.5 instead of 0, height, 0.

Try to figure out why.

@Phiwa
Copy link
Owner

Phiwa commented Sep 16, 2019

That's a valid point and should be further investigated.
Important point is that old stations databases need to be compatible, so when loading them, you need to consider integer and floating point numbers.
I think, rounding the values to two digits after the decimal point should be enough when writing to the stations database.

@mhtvsSFrpHdE
Copy link
Author

@Phiwa That would lead to a update to stations databases library.
Add a "version = 2.0" config entry to our new structure station file,
if a database doesn't contains "version = 2.0" entry
then it's a old version file and load a "old version to new version" convert function.

I'll try to coding them one by one from easy to hard so they won't bother you.

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

No branches or pull requests

2 participants