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 StateMachine process when transition to end & optimize StringName #94304

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Jul 13, 2024

Perhaps the main cause of the one frame delay is due to pending requests, so make it so that a reset request is not sent on the transition to End.

Also, if the Transition knows that the next State is End, calculate the remaining time. If there is a fade outside of the StateMachine, the StateMachine should now fade out properly as long as the length of the animation before the EndState is longer than the fade time.

Moreover, replace String comparisons with static StringName for performance.

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

This makes sense. Need to watch we're only creating / setting the stringname rarely.

@akien-mga akien-mga merged commit add558f into godotengine:master Jul 23, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants