mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 04:02:59 +08:00
Fix date being updated on replays unexpectedly
This commit is contained in:
parent
f16b4957aa
commit
b3f60c8253
@ -338,7 +338,6 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
score.MaxCombo = HighestCombo.Value;
|
score.MaxCombo = HighestCombo.Value;
|
||||||
score.Accuracy = Accuracy.Value;
|
score.Accuracy = Accuracy.Value;
|
||||||
score.Rank = Rank.Value;
|
score.Rank = Rank.Value;
|
||||||
score.Date = DateTimeOffset.Now;
|
|
||||||
|
|
||||||
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.IsScorable()))
|
foreach (var result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.IsScorable()))
|
||||||
score.Statistics[result] = GetStatistic(result);
|
score.Statistics[result] = GetStatistic(result);
|
||||||
|
@ -1019,13 +1019,7 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="score">The <see cref="Scoring.Score"/> to prepare.</param>
|
/// <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>
|
/// <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)
|
protected virtual Task PrepareScoreForResultsAsync(Score score) => Task.CompletedTask;
|
||||||
{
|
|
||||||
// perform one final population to ensure everything is up-to-date.
|
|
||||||
ScoreProcessor.PopulateScore(score.ScoreInfo);
|
|
||||||
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the <see cref="ResultsScreen"/> for a <see cref="ScoreInfo"/>.
|
/// 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);
|
await base.PrepareScoreForResultsAsync(score).ConfigureAwait(false);
|
||||||
|
|
||||||
|
score.ScoreInfo.Date = DateTimeOffset.Now;
|
||||||
|
|
||||||
await submitScore(score).ConfigureAwait(false);
|
await submitScore(score).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user