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

[OPTIMIZATION] Optimize FreeplayDJ's onFinishAnim #4254

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

Conversation

AbnormalPoof
Copy link
Collaborator

Replaces the messy if/else block in onFinishAnim with a switch statement. This also changes the function to check currentState instead of the DJ's animation prefixes. This should have no effect on functionality!

(Made with help by @Lasercar lol)

Co-authored-by: Lasercar <64717068+Lasercar@users.noreply.github.com>
Co-authored-by: Abnormal <86753001+AbnormalPoof@users.noreply.github.com>
@github-actions github-actions bot added status: pending triage Awaiting review. pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. labels Mar 2, 2025
@AbnormalPoof AbnormalPoof added type: optimization Involves a performance issue or a bug which causes lag. status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. pr: haxe PR modifies game code. and removed status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. pr: haxe PR modifies game code. labels Mar 2, 2025
@Lasercar
Copy link
Contributor

Lasercar commented Mar 4, 2025

The previous switch was somehow/for some reason overriding the switch cases, causing the intro end to be endlessly dispatched. Switching it all over to the state prevents that, and makes it even cleaner too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. type: optimization Involves a performance issue or a bug which causes lag.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants