Open Phazorknight opened 1 month ago
This behavior also affects starting a new game, which also uses the temp scene state from the previous unrelated saved/played game.
I would suggest deleting the temp scene state files when starting a new game and when quitting the application.
Hey everyone, I've just pushed an update, reworking the save system a bit that should resolve this issue, please see https://github.com/Phazorknight/Cogito/commit/0a3e062f126fdfd948de22ae962ccc992f0da861
@OvercastInteractive : I've made it that the temp save files gets deleted on quit (more precisely when cogito_save_manager exits the tree, which so far seems to work, even when returning to the menu and starting a new game)
Please note: Your previous save files will no longer be detected with this update! New save files will be created. This should make testing scene transitions easier/better.
Cogito and Godot Engine Version: Godot 4.2.1stable
Description: Temp scene states don't get "reset" after loading a game, which cause undesired scene states.
Reproduction steps:
Expected behavior: The temp scene state of the other scene should also "reset". This is not very straight forward.
One idea would be to do the following: On loading a save slot:
Load player state of said slot.
Load scene state of said slot that the player is currently in.
Find save slot scene states of any other states and set these to be the new temp scene states.
If a scene doesn't have a save slot scene state, but a temp scene state, that temp scene state gets deleted.
The last point might not really work or might deleted temp scene states we expect to stick around. Another workaround would be: on saving a save slot, convert all existing temp scene states to save slot scene states.
This would have to be tested and explored a bit.