1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:33:22 +08:00

Merge pull request #8305 from smoogipoo/fix-score-population

Fix replay scores not being populated via player
This commit is contained in:
Dean Herbert 2020-03-17 18:59:20 +09:00 committed by GitHub
commit 7a6a7c28c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -401,14 +401,18 @@ namespace osu.Game.Screens.Play
protected virtual ScoreInfo CreateScore()
{
var score = DrawableRuleset.ReplayScore?.ScoreInfo ?? new ScoreInfo
var score = new ScoreInfo
{
Beatmap = Beatmap.Value.BeatmapInfo,
Ruleset = rulesetInfo,
Mods = Mods.Value.ToArray(),
User = api.LocalUser.Value,
};
if (DrawableRuleset.ReplayScore != null)
score.User = DrawableRuleset.ReplayScore.ScoreInfo?.User ?? new GuestUser();
else
score.User = api.LocalUser.Value;
ScoreProcessor.PopulateScore(score);
return score;