ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.32k stars 2.28k forks source link

Lazer replays downloaded from lazer.ppy.sh show score as 0 inside lazer #24643

Closed bdach closed 1 year ago

bdach commented 1 year ago

Discussed in https://github.com/ppy/osu/discussions/24638

Originally posted by **Theighlin** August 24, 2023 Tried on 2 different beatmaps, one is https://lazer.ppy.sh/beatmapsets/1856043#osu/3814127 ![image](https://github.com/ppy/osu/assets/53081750/e0522a39-cfee-4a0f-936b-e789ec57c2ce) with this score (https://lazer.ppy.sh/scores/2399877639) ![image](https://github.com/ppy/osu/assets/53081750/dcaea82a-4e98-42ba-8537-29273afa4c60) Shows like this in game (Acc also changes upon importing?) ![image](https://github.com/ppy/osu/assets/53081750/378e36a7-f9e4-4e7b-982a-cda64a966ec7) [database.log](https://github.com/ppy/osu/files/12425914/database.log) [runtime.log](https://github.com/ppy/osu/files/12425915/runtime.log)
bdach commented 1 year ago

Uh, so... https://github.com/ppy/osu-server-spectator/pull/105#discussion_r816185035

I'm kinda stumped as to what this conversation might have meant and why max combo was needed for anything at all. In theory, the simple fix is this:

diff --git a/osu.Server.Spectator/Hubs/SpectatorHub.cs b/osu.Server.Spectator/Hubs/SpectatorHub.cs
index 2cc2582..2c14d44 100644
--- a/osu.Server.Spectator/Hubs/SpectatorHub.cs
+++ b/osu.Server.Spectator/Hubs/SpectatorHub.cs
@@ -113,7 +113,7 @@ namespace osu.Server.Spectator.Hubs
                 score.ScoreInfo.Statistics = data.Header.Statistics;
                 score.ScoreInfo.MaxCombo = data.Header.MaxCombo;
                 score.ScoreInfo.Combo = data.Header.Combo;
-                // TODO: TotalScore should probably be populated as well, but needs beatmap max combo.
+                score.ScoreInfo.TotalScore = data.Header.TotalScore;

                 score.Replay.Frames.AddRange(data.Frames);

@peppy do you recall why the above wasn't done? do we not trust the client data? but if we don't, then why are we using statistics/max combo at all?

For what it's worth, in my testing, I'm pretty sure that the client always sends standardised score across the wire to spectator server. So there should be no qualms caused by scoring mode here or anything of the sort.

peppy commented 1 year ago

The comment was likely from before total score was simple and included as a computed value, and had to be locally calculated via a convoluted process. The fix you propose seems correct to my eyes.

Theighlin commented 1 year ago

Not sure it's up to me, but if this is still open because there are scores still with 0, it's fine to close, I don't think it's important to act on those.

bdach commented 1 year ago

Yeah I think this is closeable.

Lemmmy commented 1 year ago

Not sure if it's related to this or a separate issue (made #24663), but seeing a lot of 0-point scores on global leaderboards. I did originally see three or four plays with nonzero scores but after reloading they're all zero now. image image image

Logs, which also contain score submission errors: logs-2023-08-26.zip

peppy commented 1 year ago

Please open a new issue