mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 14:37:30 +08:00
Merge pull request #30137 from bdach/send-mods-in-frame-headers
Send mods in spectator frame headers
This commit is contained in:
commit
3158338fe4
@ -3,8 +3,10 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MessagePack;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
@ -56,6 +58,17 @@ namespace osu.Game.Online.Spectator
|
||||
[Key(6)]
|
||||
public DateTimeOffset ReceivedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The set of mods currently active.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Nullable for backwards compatibility with older clients
|
||||
/// (these structures are also used server-side, and <see langword="null"/> will be used as marker that the data isn't there).
|
||||
/// can be made non-nullable 20250407
|
||||
/// </remarks>
|
||||
[Key(7)]
|
||||
public APIMod[]? Mods { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Construct header summary information from a point-in-time reference to a score which is actively being played.
|
||||
/// </summary>
|
||||
@ -69,6 +82,7 @@ namespace osu.Game.Online.Spectator
|
||||
MaxCombo = score.MaxCombo;
|
||||
// copy for safety
|
||||
Statistics = new Dictionary<HitResult, int>(score.Statistics);
|
||||
Mods = score.APIMods.ToArray();
|
||||
|
||||
ScoreProcessorStatistics = statistics;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user