mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Pass ScoreProcessorStatistics
to FrameHeader
, rather than the full processor
This commit is contained in:
parent
1a6d9e9ff0
commit
df662afbd5
@ -24,7 +24,7 @@ namespace osu.Game.Online.Spectator
|
||||
public FrameDataBundle(ScoreInfo score, ScoreProcessor scoreProcessor, IList<LegacyReplayFrame> frames)
|
||||
{
|
||||
Frames = frames;
|
||||
Header = new FrameHeader(score, scoreProcessor);
|
||||
Header = new FrameHeader(score, scoreProcessor.GetScoreProcessorStatistics());
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
|
@ -60,18 +60,17 @@ namespace osu.Game.Online.Spectator
|
||||
/// Construct header summary information from a point-in-time reference to a score which is actively being played.
|
||||
/// </summary>
|
||||
/// <param name="score">The score for reference.</param>
|
||||
/// <param name="scoreProcessor">The score processor for reference.</param>
|
||||
public FrameHeader(ScoreInfo score, ScoreProcessor scoreProcessor)
|
||||
/// <param name="statistics">The score processor statistics for the current point in time.</param>
|
||||
public FrameHeader(ScoreInfo score, ScoreProcessorStatistics statistics)
|
||||
{
|
||||
TotalScore = score.TotalScore;
|
||||
Accuracy = score.Accuracy;
|
||||
Combo = score.Combo;
|
||||
MaxCombo = score.MaxCombo;
|
||||
|
||||
// copy for safety
|
||||
Statistics = new Dictionary<HitResult, int>(score.Statistics);
|
||||
|
||||
ScoreProcessorStatistics = scoreProcessor.GetScoreProcessorStatistics();
|
||||
ScoreProcessorStatistics = statistics;
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
|
Loading…
Reference in New Issue
Block a user