mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Add TotalScore to replay frame headers
This commit is contained in:
parent
f3591f83a2
commit
808818768b
@ -44,6 +44,12 @@ namespace osu.Game.Online.Spectator
|
||||
[Key(4)]
|
||||
public DateTimeOffset ReceivedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total score.
|
||||
/// </summary>
|
||||
[Key(5)]
|
||||
public long TotalScore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Construct header summary information from a point-in-time reference to a score which is actively being played.
|
||||
/// </summary>
|
||||
@ -53,6 +59,7 @@ namespace osu.Game.Online.Spectator
|
||||
Combo = score.Combo;
|
||||
MaxCombo = score.MaxCombo;
|
||||
Accuracy = score.Accuracy;
|
||||
TotalScore = score.TotalScore;
|
||||
|
||||
// copy for safety
|
||||
Statistics = new Dictionary<HitResult, int>(score.Statistics);
|
||||
@ -60,13 +67,14 @@ namespace osu.Game.Online.Spectator
|
||||
|
||||
[JsonConstructor]
|
||||
[SerializationConstructor]
|
||||
public FrameHeader(double accuracy, int combo, int maxCombo, Dictionary<HitResult, int> statistics, DateTimeOffset receivedTime)
|
||||
public FrameHeader(double accuracy, int combo, int maxCombo, Dictionary<HitResult, int> statistics, DateTimeOffset receivedTime, long totalScore)
|
||||
{
|
||||
Combo = combo;
|
||||
MaxCombo = maxCombo;
|
||||
Accuracy = accuracy;
|
||||
Statistics = statistics;
|
||||
ReceivedTime = receivedTime;
|
||||
TotalScore = totalScore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -153,12 +153,10 @@ namespace osu.Game.Online.Spectator
|
||||
scoreInfo.MaxCombo = frame.Header.MaxCombo;
|
||||
scoreInfo.Statistics = frame.Header.Statistics;
|
||||
scoreInfo.MaximumStatistics = spectatorState.MaximumStatistics;
|
||||
scoreInfo.TotalScore = frame.Header.TotalScore;
|
||||
|
||||
Accuracy.Value = frame.Header.Accuracy;
|
||||
Combo.Value = frame.Header.Combo;
|
||||
|
||||
// Todo:
|
||||
// TotalScore.Value = scoreProcessor.ComputeScore(Mode.Value, scoreInfo);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user