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

Fix no tween repeat after stop and restart (Fix #39801) #46609

Merged

Conversation

jmb462
Copy link
Contributor

@jmb462 jmb462 commented Mar 3, 2021

Fix #40679

When a tween was stopped, each interpolation in the list was set to active=false
then, the main active bool was set to false.

When starting the tween again, the main active bool was set to true but not each interpolation in the list : so no repeat was happening.

I've added a for loop to reactivate each interpolation in the interpolates list when start() is called.
Need to seek to 0.0 too (only if tween has been stopped by stop_all()) because we don't want start() to act as resume() after stop_all().

@jmb462 jmb462 requested a review from a team as a code owner March 3, 2021 00:00
@Calinou Calinou added bug regression topic:core cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Mar 3, 2021
@Calinou Calinou added this to the 4.0 milestone Mar 3, 2021
@akien-mga akien-mga merged commit 4d1f83a into godotengine:master Mar 3, 2021
@akien-mga
Copy link
Member

akien-mga commented Mar 3, 2021

Thanks! And congrats for your first merged Godot contribution 🎉

@akien-mga
Copy link
Member

Backported to 3.x via #47142.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jun 3, 2021
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.

Tween didn't repeat anymore after being stopped then started again.
4 participants