mirror of
https://github.com/ppy/osu.git
synced 2025-03-21 17:57:46 +08:00
Merge pull request #23934 from peppy/fix-score-conversion-failures
Fix score migration not migrating all scores properly
This commit is contained in:
commit
f79c9d711d
@ -77,8 +77,9 @@ namespace osu.Game.Database
|
||||
/// 27 2023-06-06 Added EditorTimestamp to BeatmapInfo.
|
||||
/// 28 2023-06-08 Added IsLegacyScore to ScoreInfo, parsed from replay files.
|
||||
/// 29 2023-06-12 Run migration of old lazer scores to be best-effort in the new scoring number space. No actual realm changes.
|
||||
/// 30 2023-06-16 Run migration of old lazer scores again. This time with more correct rounding considerations.
|
||||
/// </summary>
|
||||
private const int schema_version = 29;
|
||||
private const int schema_version = 30;
|
||||
|
||||
/// <summary>
|
||||
/// Lock object which is held during <see cref="BlockAllOperations"/> sections, blocking realm retrieval during blocking periods.
|
||||
@ -938,6 +939,7 @@ namespace osu.Game.Database
|
||||
}
|
||||
|
||||
case 29:
|
||||
case 30:
|
||||
{
|
||||
var scores = migration.NewRealm
|
||||
.All<ScoreInfo>()
|
||||
|
@ -182,7 +182,7 @@ namespace osu.Game.Database
|
||||
foreach (var mod in score.Mods)
|
||||
modMultiplier *= mod.ScoreMultiplier;
|
||||
|
||||
return (long)((1000000 * (accuracyPortion * accuracyScore + (1 - accuracyPortion) * comboScore) + bonusScore) * modMultiplier);
|
||||
return (long)Math.Round((1000000 * (accuracyPortion * accuracyScore + (1 - accuracyPortion) * comboScore) + bonusScore) * modMultiplier);
|
||||
}
|
||||
|
||||
private class FakeHit : HitObject
|
||||
|
Loading…
x
Reference in New Issue
Block a user