mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Rename last remaining BeatmapInfo Beatmap
usage
This commit is contained in:
@ -67,7 +67,7 @@ namespace osu.Game.Scoring
|
||||
// Compute difficulties asynchronously first to prevent blocking via the GetTotalScore() call below.
|
||||
foreach (var s in scores)
|
||||
{
|
||||
await difficultyCache.GetDifficultyAsync(s.Beatmap, s.Ruleset, s.Mods, cancellationToken).ConfigureAwait(false);
|
||||
await difficultyCache.GetDifficultyAsync(s.BeatmapInfo, s.Ruleset, s.Mods, cancellationToken).ConfigureAwait(false);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,7 @@ namespace osu.Game.Scoring
|
||||
/// <returns>The total score.</returns>
|
||||
public async Task<long> GetTotalScoreAsync([NotNull] ScoreInfo score, ScoringMode mode = ScoringMode.Standardised, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (score.Beatmap == null)
|
||||
if (score.BeatmapInfo == null)
|
||||
return score.TotalScore;
|
||||
|
||||
int beatmapMaxCombo;
|
||||
@ -147,18 +147,18 @@ namespace osu.Game.Scoring
|
||||
|
||||
// This score is guaranteed to be an osu!stable score.
|
||||
// The combo must be determined through either the beatmap's max combo value or the difficulty calculator, as lazer's scoring has changed and the score statistics cannot be used.
|
||||
if (score.Beatmap.MaxCombo != null)
|
||||
beatmapMaxCombo = score.Beatmap.MaxCombo.Value;
|
||||
if (score.BeatmapInfo.MaxCombo != null)
|
||||
beatmapMaxCombo = score.BeatmapInfo.MaxCombo.Value;
|
||||
else
|
||||
{
|
||||
if (score.Beatmap.ID == 0 || difficulties == null)
|
||||
if (score.BeatmapInfo.ID == 0 || difficulties == null)
|
||||
{
|
||||
// We don't have enough information (max combo) to compute the score, so use the provided score.
|
||||
return score.TotalScore;
|
||||
}
|
||||
|
||||
// We can compute the max combo locally after the async beatmap difficulty computation.
|
||||
var difficulty = await difficulties().GetDifficultyAsync(score.Beatmap, score.Ruleset, score.Mods, cancellationToken).ConfigureAwait(false);
|
||||
var difficulty = await difficulties().GetDifficultyAsync(score.BeatmapInfo, score.Ruleset, score.Mods, cancellationToken).ConfigureAwait(false);
|
||||
beatmapMaxCombo = difficulty.MaxCombo;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user