1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 05:49:52 +08:00

Fix thing

This commit is contained in:
Dean Herbert
2023-06-14 17:50:46 +09:00
committed by Bartłomiej Dach
Unverified
parent 6f0c8c286b
commit d83bf02923
+16 -12
View File
@@ -945,22 +945,26 @@ namespace osu.Game.Database
foreach (var score in scores)
{
// Recalculate the old-style standardised score to see if this was an old lazer score.
bool oldScoreMatchesExpectations = StandardisedScoreMigrationTools.GetOldStandardised(score) == score.TotalScore;
// Some older scores don't have correct statistics populated, so let's give them benefit of doubt.
bool scoreIsVeryOld = score.Date < new DateTime(2023, 1, 1, 0, 0, 0);
if (oldScoreMatchesExpectations || scoreIsVeryOld)
try
{
try
{
long calculatedNew = StandardisedScoreMigrationTools.GetNewStandardised(score);
score.TotalScore = calculatedNew;
}
catch
// Recalculate the old-style standardised score to see if this was an old lazer score.
bool oldScoreMatchesExpectations = StandardisedScoreMigrationTools.GetOldStandardised(score) == score.TotalScore;
// Some older scores don't have correct statistics populated, so let's give them benefit of doubt.
bool scoreIsVeryOld = score.Date < new DateTime(2023, 1, 1, 0, 0, 0);
if (oldScoreMatchesExpectations || scoreIsVeryOld)
{
try
{
long calculatedNew = StandardisedScoreMigrationTools.GetNewStandardised(score);
score.TotalScore = calculatedNew;
}
catch
{
}
}
}
catch { }
}
break;