Allow judging at most one swell tick per frame #25010
Merged
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.
Addresses part of #24780.
This PR changes swell input handling such that only one swell tick can be judged in a given update frame. This is supposed to curtail cases wherein a user binds (either in-game, or via external tools) all four taiko actions to one key, to knock out four hits at a time with one key.
Note that this is supposed to be a starting point rather than a complete solution. As per #24780 (comment), this change is actually quite lenient in comparison to stable, in two respects:
In stable, if in one frame you hit a key that is not properly alternated and another key that is properly alternated, then the not-alternated press blocks the alternated press. In other words, the following sequence of hits:
will cause just one swell tick to be judged, even though the right center hit could have been considered valid. The implementation in this PR assumes good faith, and will count the right center hit as valid. The reason I did this is that I can see perfectly reasonable cases wherein you may e.g. have a chattering key that will cause an input to be repeated and as such unfairly eat a valid press with stable's implementation.
Also, as per the code snippet here - as long as score V2 is off - stable enforces a cooldown duration of 30ms between subsequent hits on a swell. I'm not sure what to do with that given it's dependent on score V2 for whatever reason, so I decided not to implement it for now.
If you wish to test stable, then SwellTest.zip contains a beatmap with one swell on it, as well as a replay on said map wherein all 4 keys are pressed in a single frame 7 times.