1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-07 02:13:38 +08:00

Use hash as fallback

This commit is contained in:
smoogipoo
2021-06-15 14:06:17 +09:00
Unverified
parent f6c6eea6dc
commit eb4c093371
+6 -1
View File
@@ -427,7 +427,12 @@ namespace osu.Game
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
// to ensure all the required data for presenting a replay are present.
// Todo: This should use the OnlineScoreID if available, however lazer scores are imported without an OnlineScoreID for the time being (see Player.ImportScore()).
var databasedScoreInfo = ScoreManager.Query(s => s.Hash == score.Hash);
ScoreInfo databasedScoreInfo = null;
if (score.OnlineScoreID != null)
databasedScoreInfo = ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID);
databasedScoreInfo ??= ScoreManager.Query(s => s.Hash == score.Hash);
if (databasedScoreInfo == null)
{