mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 14:52:57 +08:00
Merge pull request #13931 from peppy/fix-replay-date
Fix replay dates being unexpectedly updated on play completion
This commit is contained in:
commit
0fc1d3e404
@ -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);
|
||||
|
@ -1023,13 +1023,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"/>.
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user