mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +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)
|
public FrameDataBundle(ScoreInfo score, ScoreProcessor scoreProcessor, IList<LegacyReplayFrame> frames)
|
||||||
{
|
{
|
||||||
Frames = frames;
|
Frames = frames;
|
||||||
Header = new FrameHeader(score, scoreProcessor);
|
Header = new FrameHeader(score, scoreProcessor.GetScoreProcessorStatistics());
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonConstructor]
|
[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.
|
/// Construct header summary information from a point-in-time reference to a score which is actively being played.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="score">The score for reference.</param>
|
/// <param name="score">The score for reference.</param>
|
||||||
/// <param name="scoreProcessor">The score processor for reference.</param>
|
/// <param name="statistics">The score processor statistics for the current point in time.</param>
|
||||||
public FrameHeader(ScoreInfo score, ScoreProcessor scoreProcessor)
|
public FrameHeader(ScoreInfo score, ScoreProcessorStatistics statistics)
|
||||||
{
|
{
|
||||||
TotalScore = score.TotalScore;
|
TotalScore = score.TotalScore;
|
||||||
Accuracy = score.Accuracy;
|
Accuracy = score.Accuracy;
|
||||||
Combo = score.Combo;
|
Combo = score.Combo;
|
||||||
MaxCombo = score.MaxCombo;
|
MaxCombo = score.MaxCombo;
|
||||||
|
|
||||||
// copy for safety
|
// copy for safety
|
||||||
Statistics = new Dictionary<HitResult, int>(score.Statistics);
|
Statistics = new Dictionary<HitResult, int>(score.Statistics);
|
||||||
|
|
||||||
ScoreProcessorStatistics = scoreProcessor.GetScoreProcessorStatistics();
|
ScoreProcessorStatistics = statistics;
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonConstructor]
|
[JsonConstructor]
|
||||||
|
Loading…
Reference in New Issue
Block a user