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

Deprecate sound.group setter, avoiding recursion errors #3041

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

Geokureli
Copy link
Member

@Geokureli Geokureli commented Feb 22, 2024

destroying sounds created via FlxG.sound.load in substates get destroyed but not removed from the groups, later when destroying the state they are removed from their groups causing a null ref via updateTransform

I've deprecated the sound.group setter, this is a pretty terrible system and many parts of the code have to walk on egg shells to avoid unintended recursion, and it provides almost no real benefit over simple calls to group.add(sound) (which will still remove it from prior groups)

@Geokureli Geokureli added this to the 5.7.0 milestone Feb 22, 2024
@Geokureli
Copy link
Member Author

Ignore Nightly CI: openfl/lime#1763

@Geokureli Geokureli merged commit 4848120 into HaxeFlixel:dev Feb 23, 2024
12 of 16 checks passed
@Geokureli Geokureli deleted the sound-fix branch February 23, 2024 18:05
@Geokureli Geokureli changed the title prevent double sound destroy Deprecate sound.group setter, avoiding recursion errors Feb 24, 2024
Geokureli added a commit that referenced this pull request Feb 24, 2024
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.

1 participant