mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Change TestSpectatorClient
to provide some better fake data for score / acc
This commit is contained in:
parent
965da343a4
commit
56eb44d15b
@ -49,6 +49,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
LoadComponentAsync(leaderboard = new MultiSpectatorLeaderboard(clocks.Keys.Select(id => new MultiplayerRoomUser(id)).ToArray())
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Expanded = { Value = true }
|
||||
}, Add);
|
||||
});
|
||||
|
@ -124,7 +124,12 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
if (frames.Count == 0)
|
||||
return;
|
||||
|
||||
var bundle = new FrameDataBundle(new ScoreInfo { Combo = currentFrameIndex }, new ScoreProcessor(rulesetStore.GetRuleset(0)!.CreateInstance()), frames.ToArray());
|
||||
var bundle = new FrameDataBundle(new ScoreInfo
|
||||
{
|
||||
Combo = currentFrameIndex,
|
||||
TotalScore = (long)(currentFrameIndex * 123478 * RNG.NextDouble(0.99, 1.01)),
|
||||
Accuracy = RNG.NextDouble(0.98, 1),
|
||||
}, new ScoreProcessor(rulesetStore.GetRuleset(0)!.CreateInstance()), frames.ToArray());
|
||||
((ISpectatorClient)this).UserSentFrames(userId, bundle);
|
||||
|
||||
frames.Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user