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 issues when animation started from different scripts #159

Merged
merged 3 commits into from
Jan 30, 2024
Merged

Conversation

AGulev
Copy link
Contributor

@AGulev AGulev commented Jan 30, 2024

Fix #147

@AGulev AGulev requested a review from JCash January 30, 2024 14:00
defold-spine/src/comp_spine_model.cpp Outdated Show resolved Hide resolved
@@ -299,10 +299,10 @@ namespace dmSpine

static void ClearCompletionCallback(SpineAnimationTrack* track)
Copy link
Contributor Author

@AGulev AGulev Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use the same clear function to make sure we don't break current flow anywhere.

{
dmLogError("Could not send animation_done to listener: %d", result);
RunTrackCallback(track.m_CallbackInfo, dmGameSystemDDF::SpineAnimationDone::m_DDFDescriptor, (const char*)&message, &sender, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, maybe RunTrackCallback should return dmGameObject::Result as well?

Copy link
Contributor

@JCash JCash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Some opportunities for some cleanup.

defold-spine/src/comp_spine_model.cpp Outdated Show resolved Hide resolved
defold-spine/src/comp_spine_model.cpp Show resolved Hide resolved
defold-spine/src/script_spine.cpp Outdated Show resolved Hide resolved
defold-spine/src/script_spine.cpp Outdated Show resolved Hide resolved
defold-spine/src/comp_spine_model.cpp Outdated Show resolved Hide resolved
@AGulev AGulev requested a review from JCash January 30, 2024 16:35
@AGulev AGulev merged commit f689925 into main Jan 30, 2024
17 checks passed
@AGulev AGulev deleted the callback-fix branch January 30, 2024 16:50
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.

Spine removes wrong callback if animation started from more than one component
2 participants