This is still a workaround but arguably it's something we could leave in
place without much loss. I think this at least feels better than the
previous code.
Notably, you could argue the test coverage of the fail case is lower
since made it implicit that all tests will avoid the "backwards seek"
detections. But we never really had tests correctly- fail on the original
so I don't see any loss of value.
The quirks in question being that lazer's hit windows in mania preceding
this change are used in stable *if and only if* Score V2 is active. If
Score V2 is *not* active, stable has two disparate other sets of hit
window ranges, dependent on whether the beatmap is a convert or not.
With this commit, those hit windows are used in lazer when the Classic
mod is active.
Open points for discussion would be:
- What does this mean for plays already set on lazer using the Classic
mod? Are there even enough of them to care about? Also, on `master`
the Classic mod does precisely nothing, so maybe such scores should
just have Classic mod stripped from them?
- What does this mean for the mod multiplier of Classic in mania? (I don't
expect an answer to this one.)
The replay stability tests needed adjustments because hit windows have
been materially changed with the previous commit. What matters in the
replay stability tests is covering the time instants near the hit window
edges and ensuring that re-encode doesn't mutate the resulting
judgements, not what the particular numbers used are.
Closes https://github.com/ppy/osu/issues/27589.
Follows osu! spinner precedent in storing the holding state to the
judgement result rather than attempting to keep it in the DHO (which is
prone to getting dropped on pool re-use).
cd4ab9307c made these tests fail because
they were basically pressing and releasing a key in a single frame,
which hopefully never actually happens in real scenarios. (It's a bit
tricky to determine if it can.)
This continues on https://github.com/ppy/osu/pull/32770 via adding test
cases which cover treatment of hit windows in stable in osu!, taiko, and
mania. The test cases are exportable to beatmap `.osu` files and replay
`.osr` files for stable crosscheck by setting `ExportLocation` on the
test scene classes to a non-null path.
For the most part, osu! and taiko ground truth matches previous findings
- hit windows in those rulesets are floored to the nearest integer.
The real "star" of this diff is mania, because:
- The hit windows in mania depend on:
- overall difficulty (as expected)
- whether Score V2 is active
- if Score V2 is not active, the hit windows also depend on whether
the map was converted from another ruleset or not
- Regardless of all aforementioned factors, mania hitwindows are *not
symmetrical*. Due to what *appears* to be a straight-up bug, it is
*not possible to achieve a MEH / 50 hit result when hitting late*.
There is specific code that coerces late hits beyond 100 hit window
range to full misses:
https://github.com/peppy/osu-stable-reference/blob/996648fba06baf4e7d2e0b248959399444017895/osu!/GameplayElements/HitObjectManagerMania.cs#L737-L751
Note that despite the fact that I'm PRing these test cases, none of this
is a promise that all of stable behaviours will be returning unchanged
when I PR something to actually do something about this and the other
issue of replay instability. This is just coverage, to be used for
awareness of what's still broken. The extent of how much stable is going
to be humored here going forward will be subject to negotiation.
Apparently useful in modding workflows when you want to test out a few
different variants of a thing.
Re-uses `Ctrl-L` binding from stable. Some folks may argue that the
dialog makes the hotkey pointless, but I really do want to protect
users from accidental data loss, and also if you want to power through
it quickly, you can hit the 1 key when the dialog shows, which will
bypass the hold-to-activate period (which wasn't intentional, but so
many people want a bypass at this point that we're probably keeping that
behaviour for power users).