pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.58k stars 364 forks source link

Fix backwards save compatibility with v90 saves #5798

Closed Web-eWorks closed 2 months ago

Web-eWorks commented 2 months ago

Fixes #5797 - the issue was inadvertently caused by the lack of compatibility testing with existing v90 savefiles. The fix is quite simple, and savefiles created in the 20240203 release should be fully loadable with this PR merged.

Testing appreciated, of course.

pghvlaans commented 2 months ago

Loading most of my saves worked, but this one caused a crash, probably because my ship was docked at a starport that had been relocated (Cydonia).

carlson.gz output.txt

impaktor commented 2 months ago

@pghvlaans that save works for me, on current master, 8b6ae921b3cbd410235b8cbb839a4a7cfde01e9b which is still on 2024-03-14 release.

impaktor commented 2 months ago

@Web-eWorks A wise man once, many moons ago, adviced me to also include a commit for this line, lest we forget https://github.com/pioneerspacesim/pioneer/blob/8b6ae921b3cbd410235b8cbb839a4a7cfde01e9b/CMakeLists.txt#L7

Web-eWorks commented 2 months ago

That save is failing because GJ 1075 moved from <2,-4,-1,1> to <2,-1,-4,1> during the 2024-03-14 development cycle. I've altered the path reference in the save and it should now function:

carlson.gz.json