1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 18:47:27 +08:00
Commit Graph

614 Commits

Author SHA1 Message Date
Dan Balasescu
655b0f5343
Merge branch 'master' into negative-frame-handling 2024-05-29 13:14:59 +09:00
Bartłomiej Dach
ed498f6eed
Do not attempt to match score by equality of hash if it's empty
Closes https://github.com/ppy/osu/issues/28216.

The affected user's database contained six sentakki scores with an empty
hash. When an online score is being imported, an online model (which
does not have a hash) will be transmogrified into a `ScoreInfo` with
an empty hash, which would end up accidentally matching those scores
and basically breaking everything at that point.

To fix, avoid attempting to match anything on empty hash. This does not
break online score matching because for those cases the actual online ID
of the score will be used.
2024-05-20 15:05:41 +02:00
Bartłomiej Dach
03a279a48d
Use hash rather than online ID as primary lookup key when presenting score
Something I ran into when investigating
https://github.com/ppy/osu/issues/28169.

If there are two scores with the same online ID available in the
database - for instance, one being recorded locally, and one recorded by
spectator server, of one single play - the lookup code would use online
ID first to find the score and pick any first one that matched. This
could lead to the wrong replay being refetched and presented / exported.

(In the case of the aforementioned issue, I was confused as to whether
after restarting spectator server midway through a play and importing
the replay saved by spectator server after the restart, I was seeing a
complete replay with no dropped frames, even though there was nothing in
the code that prevented the frame drop. It turns out that I was getting
presented the locally recorded replay instead all along.)

Instead, jiggle the fallback preference to use hash first.
2024-05-14 11:16:50 +02:00
Bartłomiej Dach
c9414da5d4
Merge branch 'master' into pre-mod-multiplier-score 2024-05-08 13:39:44 +02:00
Bartłomiej Dach
9c6968c13a
Use score.User.OnlineID instead of score.UserID
You'd hope that they'd be the same thing, but
post-https://github.com/ppy/osu-server-spectator/pull/230 it turns out
that cannot be guaranteed, so just attempt to use `User` in the encoder
consistently everywhere...
2024-05-06 16:29:03 +02:00
Bartłomiej Dach
abfb2c00bc
Look up users by ID if available when importing scores 2024-05-06 13:24:34 +02:00
Bartłomiej Dach
554ead0d9d
Decode user ID from score if available 2024-05-06 12:28:13 +02:00
Bartłomiej Dach
4d9ccdc3b2
Encode user ID to replays 2024-05-06 12:28:13 +02:00
Bartłomiej Dach
afb491dff0
Do not perform username lookups for scores without an online ID 2024-05-03 13:59:36 +02:00
Bartłomiej Dach
555305bf7f
Merge pull request #28058 from frenzibyte/export-score-rank
Preserve score rank on lazer scores during encode/decode
2024-05-02 08:44:10 +02:00
Salman Ahmed
0106f1fe3e Preserve score rank on encode/decode 2024-05-01 23:31:23 +03:00
Salman Ahmed
97fc2a5473 Disable inconsistent naming in some fields of ScoreRank 2024-05-01 17:22:10 +03:00
Joseph Madamba
35eddf35c5 Return Task.CompletedTask instead of null 2024-04-22 11:22:39 -07:00
Joseph Madamba
a59bf6d373 Improve xmldoc wording 2024-04-22 11:17:27 -07:00
Joseph Madamba
d08b1e5ae7 Add xmldoc to GetScore() and Export() and remove xmldoc from private getDatabasedScoreInfo() 2024-04-17 21:52:36 -07:00
Bartłomiej Dach
2f1a4cdaa4
Export and import TotalScoreWithoutMods to replays (or recalculate if it missing) 2024-04-17 09:08:15 +02:00
Bartłomiej Dach
a386068ed3
Add ScoreInfo.TotalScoreWithoutMods 2024-04-17 08:51:53 +02:00
Joseph Madamba
514e316b49 Make getDatabasedScoreInfo() private and move to GetScore() and Export() 2024-04-15 20:48:51 -07:00
Joseph Madamba
ed8b596325 Fix replay export not working correctly from online leaderboards 2024-04-14 16:22:58 -07:00
Joseph Madamba
f282152f99 Enable NRT to ScoreManager 2024-04-14 15:53:29 -07:00
Bartłomiej Dach
73926592b9
Bump legacy score version to recalculate all scores 2024-03-25 19:27:38 +01:00
Bartłomiej Dach
990a07af0e
Rewrite handling of legacy replay frame quirks to match stable closer 2024-03-21 21:11:29 +01:00
Bartłomiej Dach
c47463ee0e
Merge branch 'master' into negative-frame-handling 2024-03-21 16:45:35 +01:00
Dan Balasescu
f6069d8d93
Compare against MaxCombo instead 2024-03-19 17:46:18 +09:00
Dan Balasescu
6e33509417
Remove added property, use local decoding instead 2024-03-19 17:44:37 +09:00
Dan Balasescu
af713a7869
Fix incorrectly encoded score IsPerfect value 2024-03-19 17:20:59 +09:00
Dan Balasescu
e0fe33a7a7
Merge pull request #27513 from bdach/osu-score-conversion-bad-very-not-good
Fix osu! standardised score estimation algorithm violating basic invariants
2024-03-07 17:05:32 +09:00
Bartłomiej Dach
3121cf81e6
Bump score version 2024-03-06 21:30:09 +01:00
Dan Balasescu
d8003ab8e8
Merge pull request #27489 from bdach/fix-catch-pp-mismatch
Fix catch pp calculator not matching live with respect to miss handling
2024-03-06 19:39:20 +09:00
Berkan Diler
6fabbe2616 Use new ToDictionary() overload without delegates 2024-03-05 10:27:12 +01:00
Bartłomiej Dach
dcd6b02809
Fix incorrect implementation of GetCountMiss() for catch 2024-03-04 11:49:12 +01:00
Bartłomiej Dach
4bc92a263f
Bump score version 2024-02-24 13:20:42 +01:00
Salman Ahmed
4f0f07d55a Remove placeholder classes and inline everything 2024-02-12 21:30:10 +03:00
Salman Ahmed
2ae616a88e Combine other cases of displaying dash in scores PP 2024-02-12 12:29:33 +03:00
Bartłomiej Dach
706a16677c
Use localised string 2024-02-07 13:38:05 +01:00
Bartłomiej Dach
9a3c947319
Remove unnecessary #nullable disable 2024-02-07 13:35:12 +01:00
Salman Ahmed
b78c6ed673 Update design of "unprocessed PP" placeholder to match web 2024-02-05 23:29:24 +03:00
Salman Ahmed
6b7ffc240b Support displaying "unranked PP" placeholder 2024-02-05 23:29:24 +03:00
Salman Ahmed
4be4ed7ab2 Add "ranked" attribute to scores 2024-02-05 23:29:24 +03:00
Bartłomiej Dach
6888cda02c
Make LegacyScoreDecoder.PopulateMaximumStatistics() public
For `osu-tools` consumption.
2024-01-29 21:42:38 +01:00
Dean Herbert
76832a1495
Remove ScorePerformanceCache
This class was only used in two places, both on the results screen, but
was holding references to `OsuPlayfield` game-wide (due to unrelated
issues, but still).

Because I can't really think of future use cases for this, and running
the calculation twice at results screen isn't a huge overhead, let's
just do that for now to keep things simple.
2024-01-29 15:28:20 +09:00
Bartłomiej Dach
cb87d6ce50
Move transferal of LegacyTotalScore back to original spot
This subtle detail was messing with server-side score import flows.
Server-side, legacy total score will *already* be in `LegacyTotalScore`
from the start, and `TotalScore` will be zero until recomputed via
`StandardisedScoreMigrationTools.UpdateFromLegacy()` - so in that
context, attempting to move it across is incorrect.
2024-01-23 12:42:57 +01:00
Bartłomiej Dach
4d253ebf3c
Remove redundant assertion
It does look pretty dumb to be checking if something is `null` *after
calling an instance method on it*...
2024-01-22 22:01:03 +01:00
Bartłomiej Dach
cdd6e71d01
Remove legacy computation of accuracy & ranks 2024-01-22 20:52:54 +01:00
Bartłomiej Dach
db4849442e
Unify legacy total score / accuracy / rank recomputation flows 2024-01-22 20:52:51 +01:00
Bartłomiej Dach
2958631c5d
Use lazer accuracy & rank implementations across the board 2024-01-22 20:30:16 +01:00
Bartłomiej Dach
aa8eee0796
Move maximum statistics population to LegacyScoreDecoder 2024-01-22 20:01:24 +01:00
Dean Herbert
644e7d6fe6
Add migration 2024-01-22 21:43:32 +09:00
Dean Herbert
c8521b49cd
Change S rank to require no miss 2024-01-22 21:43:32 +09:00
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