From 6fb1fe06a03c56325f0f3d97fbbb8f3912ab79a1 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 2 Jun 2022 14:47:04 +0900 Subject: [PATCH] Remove unnecessary ApplyBeatmap call --- .../Spectator/SpectatorScoreProcessor.cs | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs b/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs index e81cf433a5..634af73c44 100644 --- a/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs +++ b/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs @@ -10,12 +10,8 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; -using osu.Game.Beatmaps; -using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Beatmaps.Timing; using osu.Game.Rulesets; using osu.Game.Rulesets.Mods; -using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Scoring; using osu.Game.Scoring; @@ -109,10 +105,7 @@ private void onSpectatorStatesChanged(object? sender, NotifyDictionaryChangedEve spectatorState = userState; scoreInfo = new ScoreInfo { Ruleset = rulesetInfo }; scoreProcessor = ruleset.CreateScoreProcessor(); - - // Mods are required for score multiplier. scoreProcessor.Mods.Value = userState.Mods.Select(m => m.ToMod(ruleset)).ToArray(); - scoreProcessor.ApplyBeatmap(new DummyBeatmap()); } private void onNewFrames(int incomingUserId, FrameDataBundle bundle) @@ -165,23 +158,6 @@ protected override void Dispose(bool isDisposing) spectatorClient.OnNewFrames -= onNewFrames; } - private class DummyBeatmap : IBeatmap - { - public BeatmapInfo BeatmapInfo { get; set; } = new BeatmapInfo(); - public BeatmapMetadata Metadata { get; } = new BeatmapMetadata(); - public BeatmapDifficulty Difficulty { get; set; } = new BeatmapDifficulty(); - public ControlPointInfo ControlPointInfo { get; set; } = new ControlPointInfo(); - public List Breaks { get; } = new List(); - public double TotalBreakTime => 0; - public IReadOnlyList HitObjects => Array.Empty(); - - public IEnumerable GetStatistics() => Array.Empty(); - - public double GetMostCommonBeatLength() => 0; - - public IBeatmap Clone() => throw new NotImplementedException(); - } - private class TimedFrame : IComparable { public readonly double Time;