1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 16:52:55 +08:00

Fix ScoreStore replays not getting users

This commit is contained in:
smoogipoo 2018-01-17 17:55:55 +09:00
parent 2ebb3d6e0e
commit a01e46bb68

View File

@ -11,6 +11,7 @@ using osu.Game.Database;
using osu.Game.IO.Legacy; using osu.Game.IO.Legacy;
using osu.Game.IPC; using osu.Game.IPC;
using osu.Game.Rulesets.Replays; using osu.Game.Rulesets.Replays;
using osu.Game.Users;
using SharpCompress.Compressors.LZMA; using SharpCompress.Compressors.LZMA;
namespace osu.Game.Rulesets.Scoring namespace osu.Game.Rulesets.Scoring
@ -55,7 +56,7 @@ namespace osu.Game.Rulesets.Scoring
var beatmapHash = sr.ReadString(); var beatmapHash = sr.ReadString();
score.Beatmap = beatmaps.QueryBeatmap(b => b.MD5Hash == beatmapHash); score.Beatmap = beatmaps.QueryBeatmap(b => b.MD5Hash == beatmapHash);
/* score.PlayerName = */ /* score.PlayerName = */
sr.ReadString(); score.User = new User { Username = sr.ReadString() };
/* var localScoreChecksum = */ /* var localScoreChecksum = */
sr.ReadString(); sr.ReadString();
/* score.Count300 = */ /* score.Count300 = */
@ -108,7 +109,10 @@ namespace osu.Game.Rulesets.Scoring
using (var lzma = new LzmaStream(properties, replayInStream, compressedSize, outSize)) using (var lzma = new LzmaStream(properties, replayInStream, compressedSize, outSize))
using (var reader = new StreamReader(lzma)) using (var reader = new StreamReader(lzma))
{
score.Replay = createLegacyReplay(reader); score.Replay = createLegacyReplay(reader);
score.Replay.User = score.User;
}
} }
} }