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

_reload_scene() is using free() instead of queue_free() #13

Merged
merged 1 commit into from
Apr 14, 2022
Merged

_reload_scene() is using free() instead of queue_free() #13

merged 1 commit into from
Apr 14, 2022

Conversation

mouring
Copy link
Contributor

@mouring mouring commented Apr 10, 2022

Change to queue_free() to free() otherwise calling fade_out() too close to change_scene() results in a game crash as the object is still being locked waiting for signals to be completed.

e.g.

SceneManager.fade_out()
SceneManager.change_scene(
	'res://demo/test.tscn', {
		"pattern_enter": "diagonal", 
		"pattern_leave": "curtains", 
		"invert_on_leave": false,
		"skip_fade_out": true,
	}

Unless you change the line to yield(SceneManager.fade_out(), "complete") or add in "yield(SceneManager, "fade_complete").

@jabsatz jabsatz merged commit 1fb278b into glass-brick:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants