1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 12:42:54 +08:00

Remove some unnecessary code

This commit is contained in:
smoogipoo 2021-04-09 20:22:30 +09:00
parent 61c400b1a1
commit 3e46d6401e
2 changed files with 3 additions and 10 deletions

View File

@ -82,7 +82,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
} }
private bool canStartGameplay => private bool canStartGameplay =>
// All players must be loaded. // All players must be loaded, and...
AllPlayersLoaded AllPlayersLoaded
&& ( && (
// All players have frames... // All players have frames...

View File

@ -7,7 +7,6 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Scoring; using osu.Game.Scoring;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using osu.Game.Users; using osu.Game.Users;
@ -24,7 +23,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
public User User => Score.ScoreInfo.User; public User User => Score.ScoreInfo.User;
public WorkingBeatmap Beatmap { get; private set; } public WorkingBeatmap Beatmap { get; private set; }
public Ruleset Ruleset { get; private set; }
public readonly Score Score; public readonly Score Score;
@ -43,7 +41,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
private void load(BeatmapManager beatmapManager) private void load(BeatmapManager beatmapManager)
{ {
Beatmap = beatmapManager.GetWorkingBeatmap(Score.ScoreInfo.Beatmap, bypassCache: true); Beatmap = beatmapManager.GetWorkingBeatmap(Score.ScoreInfo.Beatmap, bypassCache: true);
Ruleset = Score.ScoreInfo.Ruleset.CreateInstance();
InternalChild = new GameplayIsolationContainer(Beatmap, Score.ScoreInfo.Ruleset, Score.ScoreInfo.Mods) InternalChild = new GameplayIsolationContainer(Beatmap, Score.ScoreInfo.Ruleset, Score.ScoreInfo.Mods)
{ {
@ -87,15 +84,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
return; return;
if (catchupRequired) if (catchupRequired)
{
Beatmap.Track.AddAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment); Beatmap.Track.AddAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment);
isCatchingUp = true;
}
else else
{
Beatmap.Track.RemoveAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment); Beatmap.Track.RemoveAdjustment(AdjustableProperty.Frequency, catchupFrequencyAdjustment);
isCatchingUp = false;
} isCatchingUp = catchupRequired;
} }
public double GetCurrentGameplayTime() public double GetCurrentGameplayTime()