mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Merge pull request #13497 from smoogipoo/fix-present-score
Make PresentScore() use replay hash as fallback
This commit is contained in:
commit
f802679d38
@ -426,9 +426,12 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
// 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.
|
// to ensure all the required data for presenting a replay are present.
|
||||||
var databasedScoreInfo = score.OnlineScoreID != null
|
ScoreInfo databasedScoreInfo = null;
|
||||||
? ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID)
|
|
||||||
: ScoreManager.Query(s => s.Hash == score.Hash);
|
if (score.OnlineScoreID != null)
|
||||||
|
databasedScoreInfo = ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID);
|
||||||
|
|
||||||
|
databasedScoreInfo ??= ScoreManager.Query(s => s.Hash == score.Hash);
|
||||||
|
|
||||||
if (databasedScoreInfo == null)
|
if (databasedScoreInfo == null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user