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

[3.x] Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801) #47142

Conversation

jmb462
Copy link
Contributor

@jmb462 jmb462 commented Mar 18, 2021

Fix #39760 & #39801 for 3.2 branch

These issues were fixed in 4.0 master branch (and closed) but are still active in the 3.2 branch.

Issues :

Cause :

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.

Fix proposal : (Backport from my previous merged PR #46609 for 4.0)

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().

Fix godotengine#39760 & godotengine#39801

These issues were resolved in master branch (and closed) but are still active in the 3.2 branch.
@jmb462 jmb462 requested a review from a team as a code owner March 18, 2021 21:21
@jmb462 jmb462 changed the title 3.2 - Fix Tween.is_active() always true after stop() and then start() 3.2 - Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801) Mar 18, 2021
@Calinou Calinou added this to the 3.3 milestone Mar 19, 2021
@akien-mga akien-mga modified the milestones: 3.3, 3.4 Mar 19, 2021
@akien-mga akien-mga changed the base branch from 3.2 to 3.x March 19, 2021 10:32
@akien-mga akien-mga changed the title 3.2 - Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801) [3.x] Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801) Mar 19, 2021
@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 19, 2021
@akien-mga
Copy link
Member

I wouldn't merge at this stage for 3.3 (too close to the stable release so too risky), but we can merge for 3.4, and cherry-pick for 3.3.1.

@akien-mga akien-mga added cherrypick:3.3 and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Mar 22, 2021
@akien-mga akien-mga merged commit ed28ce5 into godotengine:3.x Jun 3, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

I prefer not to cherry-pick for 3.3 at this stage.

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.

3 participants