1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-03 10:12:54 +08:00

Fix date being updated on replays unexpectedly

This commit is contained in:
Dean Herbert 2021-07-19 19:28:35 +09:00
parent f16b4957aa
commit b3f60c8253
3 changed files with 3 additions and 8 deletions

View File

@ -338,7 +338,6 @@ namespace osu.Game.Rulesets.Scoring
score.MaxCombo = HighestCombo.Value;
score.Accuracy = Accuracy.Value;
score.Rank = Rank.Value;
score.Date = DateTimeOffset.Now;
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.IsScorable()))
score.Statistics[result] = GetStatistic(result);

View File

@ -1019,13 +1019,7 @@ namespace osu.Game.Screens.Play
/// </summary>
/// <param name="score">The <see cref="Scoring.Score"/> to prepare.</param>
/// <returns>A task that prepares the provided score. On completion, the score is assumed to be ready for display.</returns>
protected virtual Task PrepareScoreForResultsAsync(Score score)
{
// perform one final population to ensure everything is up-to-date.
ScoreProcessor.PopulateScore(score.ScoreInfo);
return Task.CompletedTask;
}
protected virtual Task PrepareScoreForResultsAsync(Score score) => Task.CompletedTask;
/// <summary>
/// Creates the <see cref="ResultsScreen"/> for a <see cref="ScoreInfo"/>.

View File

@ -109,6 +109,8 @@ namespace osu.Game.Screens.Play
{
await base.PrepareScoreForResultsAsync(score).ConfigureAwait(false);
score.ScoreInfo.Date = DateTimeOffset.Now;
await submitScore(score).ConfigureAwait(false);
}