1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00
osu-lazer/osu.Game/Scoring
Bartłomiej Dach 17b9d842ab
Fix incorrect accuracy and rank population when decoding lazer replays
Closes https://github.com/ppy/osu/issues/24061.

The gist of this change is that if the `LegacyReplaySoloScoreInfo`
bolt-on is present in the replay, then it can (and is) used to recompute
the accuracy, and rank is computed based on that.

This was the missing part of
https://github.com/ppy/osu/issues/24061#issuecomment-1888438151.
The accuracy would change on import before that because the encode
process is _lossy_ if the `LegacyReplaySoloScoreInfo` bolt-on is not
used, as the legacy format only has 6 fields for encoding judgement
counts, and some judgements that affect accuracy in lazer do not fit
into that.

Note that this _only_ fixes _relatively_ new lazer scores looking wrong
after reimport.

- Very old lazer scores, i.e. ones that don't have the
  `LegacyReplaySoloScoreInfo` bolt-on, obviously can't use it
  to repopulate. There's really not much good that can be done there,
  so the stable pathways are used as a fallback that always works.

- For stable replays, `ScoreImporter` recalculates the accuracy of
  the score _again_ in

  15a5fd7e4c/osu.Game/Scoring/ScoreImporter.cs (L106-L110)

  as `StandardisedScoreMigrationTools.UpdateFromLegacy()` recomputes
  _both_ total score and accuracy.

  This makes a _semblance_ of sense as it attempts to make the accuracy
  of stable and lazer replays comparable. In most cases it also won't
  matter, as the only ruleset where accuracy changed between the legacy
  implementation and current lazer accuracy is mania.

  But it is also an inaccurate process (as, again, some of the required
  data is not in the replay, namely judgement counts of ticks
  and so on).

  For whatever's worth, a similar thing happens server-side in

  106c2948db/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Queue/BatchInserter.cs (L319)

- However, _ranks_ of stable scores will still use the local stable
  reimplementation of ranks, i.e. a 1-miss stable score in osu! ruleset
  will be an A rather than an S. See importer:

  106c2948db/osu.Server.Queues.ScoreStatisticsProcessor/Commands/Queue/BatchInserter.cs (L237)

  (it's the same method which is renamed
  to `PopulateLegacyAccuracyAndRank()` in this commit).

  That is all a bit of a mess honestly, but I'm not sure where to even
  begin there...
2024-01-16 22:38:53 +01:00
..
Drawables Partial everything 2022-11-27 00:00:27 +09:00
Legacy Fix incorrect accuracy and rank population when decoding lazer replays 2024-01-16 22:38:53 +01:00
HitResultDisplayStatistic.cs Automated pass 2023-06-24 01:00:03 +09:00
IScoreInfo.cs Delete ScoreInfo.HasReplay as no longer needed 2023-10-27 12:39:54 +02:00
LegacyDatabasedScore.cs Fix crash when attempting to watch a replay when the storage file doesn't exist 2022-08-30 18:18:46 +09:00
RankingTier.cs Add tiered level badge colouring 2023-01-18 16:25:11 +03:00
Score.cs Revert nullability enable in Score (and related changes) 2023-06-24 15:35:07 +02:00
ScoreImporter.cs Add accuracy conversion, fix usages 2023-12-21 15:09:56 +09:00
ScoreInfo.cs Make slider ends show on results screen again 2024-01-02 17:01:32 +09:00
ScoreInfoExtensions.cs Make ScoreInfo.BeatmapInfo nullable 2023-07-04 14:50:34 +09:00
ScoreManager.cs Add LegacyOnlineID handling to places that definitely need it 2023-10-16 11:20:02 +02:00
ScoreModelDownloader.cs Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
ScorePerformanceCache.cs Make ScoreInfo.BeatmapInfo nullable 2023-07-04 14:50:34 +09:00
ScoreRank.cs Automated pass 2023-06-24 01:00:03 +09:00