Skip to content

Propagate Tween.kill() to subtweens #108227

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Meorge
Copy link
Contributor

@Meorge Meorge commented Jul 3, 2025

This PR fixes a problem with tween/subtween logic I noticed while investigating another issue. Previously, when a tween was killed with kill(), if it had subtweens in it that hadn't yet been run, those subtweens would never be executed, but would also never be explicitly killed or made invalid. As a result, if user code was monitoring the status of a subtween (say, waiting for it to be killed or finished), they would end up waiting forever.

With this PR, a kill() call on a Tween is passed down to all of its subtweens as well, ensuring that they are all marked as dead/invalid.

Note

Previously this PR also cleared subtweens when clear() was called on the parent. As I thought it through more I realized this didn't make sense, so I removed that but kept the kill() behavior.

@Meorge Meorge requested a review from a team as a code owner July 3, 2025 03:57
@Meorge Meorge force-pushed the bugfix/kill-subtweens branch from 60135bd to 7449928 Compare July 3, 2025 05:08
@Meorge Meorge changed the title Propagate Tween.kill() and Tween.clear() to subtweens Propagate Tween.kill() to subtweens Jul 3, 2025
@Chaosus Chaosus added this to the 4.6 milestone Jul 3, 2025
@Meorge Meorge force-pushed the bugfix/kill-subtweens branch from 7449928 to 45460bf Compare July 5, 2025 04:47
@Meorge Meorge force-pushed the bugfix/kill-subtweens branch from 45460bf to 4e82bde Compare July 10, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants