Fix osu! and base HP processor break time simulation #25420
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.
Prereqs:
OsuHealthProcessor
that uses the legacy drain rate algorithm #25418The osu! implementation (from the PR above) carried forward a bug from osu! stable that made the simulated break time calculation unable to deal with overlapping breaks. One map where this occurs is https://osu.ppy.sh/beatmapsets/201#osu/614 . I'm unsure of any other maps with the same issue.
The base implementation also exhibited a bug, but in this case it is relating to the length of break time. In osu!stable (v8+) and osu!lazer, drain time stops for the full duration between two hitobjects that are separated by a break. The simulation instead assumed that drain starts again once the break ends, which is not the case.
Plus, the existing implementation was hard to follow with the way it used indices.
Please note that this makes drain rate no longer match osu!stable in these particular cases.