Skip to content

Commit

Permalink
Merge pull request #224 from mrezai/fix-loading
Browse files Browse the repository at this point in the history
Fix loading a existing scene state
  • Loading branch information
Phazorknight authored Jul 11, 2024
2 parents 10c71a7 + 5d0ff89 commit 8a9c1f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion COGITO/SceneManagement/cogito_scene_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ func get_existing_player_state(passed_slot) -> CogitoPlayerState:


func get_existing_scene_state(passed_slot) -> CogitoSceneState:
var scene_state_file : String = cogito_state_dir + cogito_scene_state_prefix + passed_slot + ".res"
var current_scene : String = ""
if _player_state:
current_scene = _player_state.player_current_scene
var scene_state_file : String = cogito_state_dir + cogito_scene_state_prefix + passed_slot + "_" + current_scene + ".res"
print("CSM: Looking for file: ", scene_state_file)
if ResourceLoader.exists(scene_state_file):
print("CSM: Get existing scene state: found for slot ", passed_slot, ".")
Expand Down

0 comments on commit 8a9c1f0

Please sign in to comment.