Merged
Conversation
pgmzeta
reviewed
Jan 14, 2026
pgmzeta
approved these changes
Jan 15, 2026
JORJ949
approved these changes
Jan 21, 2026
Contributor
Author
Azrun
reviewed
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Bug] [Runtime] [Player Actions]
About the PR
Fixes #25572
This PR both corrects a division by zero runtime error and resolves the linked issue by bounding dance speed to reasonable BPMs.
Why's this needed?
After reproducing issue #25572, I discovered that the bug only occurs when
time_per_countequals zero. I don't know exactly why it happens, but it's accompanied with a division by zero runtime error. Realistically speaking, dancing at a time per count equal to zero shouldn't even be possible-- that would just be standing. Dancing at a negative BPM also doesn't make sense, so this PR just limits player adjustments ontime_per_countsuch that they're always greater than zero.Dancing with a very slow time per count can allow players to maintain a prolonged and subtle sprite shift that is both potentially advantageous in combat and antithetical to the concept of dancing. (Not to mention that it's difficult to return from since you have to spam the "faster" button to get it back to a reasonable speed.) Aside from that, it also leads BPM towards zero (though it might not actually ever reach it due to the nature of whatever decaying function may be said to represent its slowing decrease).
Testing
On a debug build of the codebase I spawned a pair of dancing dress shoes and verified that the bounds worked as expected when speed was adjusted.