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

Fix incorrect position of starports #5793

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

Web-eWorks
Copy link
Member

This PR addresses a platform-specific issue where on Windows a fixed-point fractional part greater than 0.5 was being silently truncated when loaded from JSON files. This is most likely the cause for starport positions to be completely incorrect on Windows specifically.

This PR also addresses the log warnings about negative inclination values coming from legacy Lua-based systems until such a time as we convert all such systems to JSON.

Fixes #5792, fixes #5744.

- Existing spaceports were defined in Lua with negative inclination/longitude, but constrained to only positive on load
- std::strtol returns a 32-bit signed integer on Windows but 64-bit on Linux
- Use 64-bit version to ensure we can load the entire fractional bit range
@Web-eWorks Web-eWorks requested a review from bszlrd March 12, 2024 23:23
@Web-eWorks Web-eWorks merged commit 0dd3e4e into pioneerspacesim:master Mar 14, 2024
5 checks passed
@Web-eWorks Web-eWorks deleted the editor-fixes branch June 26, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System editor loads body parameter wrongly from .json file Incorrect city locations
1 participant