From 4f8549f220e9da6eedb24fe37b0543a7189ff8ea Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 7 May 2017 00:38:17 +0800 Subject: [PATCH 1/7] Standardise usages of exceptions. --- osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs | 4 ++-- osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs | 2 +- osu.Game/Database/ScoreDatabase.cs | 4 ++-- osu.Game/Graphics/OsuColour.cs | 2 +- osu.Game/Rulesets/UI/HitRenderer.cs | 2 +- osu.Game/Screens/Play/Player.cs | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs b/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs index d2cd7a1156..65ed9530f2 100644 --- a/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs +++ b/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs @@ -58,8 +58,8 @@ namespace osu.Game.Rulesets.Osu.Replays { public int Compare(ReplayFrame f1, ReplayFrame f2) { - if (f1 == null) throw new NullReferenceException($@"{nameof(f1)} cannot be null"); - if (f2 == null) throw new NullReferenceException($@"{nameof(f2)} cannot be null"); + if (f1 == null) throw new ArgumentNullException(nameof(f1)); + if (f2 == null) throw new ArgumentNullException(nameof(f2)); return f1.Time.CompareTo(f2.Time); } diff --git a/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs b/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs index eec614426f..c3e5597f43 100644 --- a/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs +++ b/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs @@ -109,7 +109,7 @@ namespace osu.Game.Rulesets.Taiko.Replays Frames.Add(new ReplayFrame(h.StartTime, null, null, button)); } else - throw new Exception("Unknown hit object type."); + throw new InvalidOperationException("Unknown hit object type."); Frames.Add(new ReplayFrame(endTime + KEY_UP_DELAY, null, null, ReplayButtonState.None)); diff --git a/osu.Game/Database/ScoreDatabase.cs b/osu.Game/Database/ScoreDatabase.cs index 8ea836aceb..adca76d2ac 100644 --- a/osu.Game/Database/ScoreDatabase.cs +++ b/osu.Game/Database/ScoreDatabase.cs @@ -94,13 +94,13 @@ namespace osu.Game.Database { byte[] properties = new byte[5]; if (replayInStream.Read(properties, 0, 5) != 5) - throw new Exception("input .lzma is too short"); + throw new IOException("input .lzma is too short"); long outSize = 0; for (int i = 0; i < 8; i++) { int v = replayInStream.ReadByte(); if (v < 0) - throw new Exception("Can't Read 1"); + throw new IOException("Can't Read 1"); outSize |= (long)(byte)v << (8 * i); } diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index cd719431e7..15ffefc45d 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -16,7 +16,7 @@ namespace osu.Game.Graphics switch (hex.Length) { default: - throw new Exception(@"Invalid hex string length!"); + throw new ArgumentException(@"Invalid hex string length!"); case 3: return new Color4( (byte)(Convert.ToByte(hex.Substring(0, 1), 16) * 17), diff --git a/osu.Game/Rulesets/UI/HitRenderer.cs b/osu.Game/Rulesets/UI/HitRenderer.cs index 69e0e73664..8ee67df95a 100644 --- a/osu.Game/Rulesets/UI/HitRenderer.cs +++ b/osu.Game/Rulesets/UI/HitRenderer.cs @@ -279,7 +279,7 @@ namespace osu.Game.Rulesets.UI protected abstract Playfield CreatePlayfield(); } - public class BeatmapInvalidForRulesetException : Exception + public class BeatmapInvalidForRulesetException : ArgumentException { public BeatmapInvalidForRulesetException(string text) : base(text) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 37b4cf5b45..67bf1e8192 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -90,7 +90,7 @@ namespace osu.Game.Screens.Play Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true); if (Beatmap?.Beatmap == null) - throw new Exception("Beatmap was not loaded"); + throw new InvalidOperationException("Beatmap was not loaded"); ruleset = osu?.Ruleset.Value ?? Beatmap.BeatmapInfo.Ruleset; rulesetInstance = ruleset.CreateInstance(); @@ -109,7 +109,7 @@ namespace osu.Game.Screens.Play } if (!HitRenderer.Objects.Any()) - throw new Exception("Beatmap contains no hit objects!"); + throw new InvalidOperationException("Beatmap contains no hit objects!"); } catch (Exception e) { From dff05bec797551f83239650c6a73a82cfa9f4510 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 18:56:04 +0800 Subject: [PATCH 2/7] Use readonly fields. --- .../Beatmaps/IO/LegacyFilesystemReader.cs | 2 +- osu.Game/Beatmaps/Formats/BeatmapDecoder.cs | 2 +- osu.Game/Beatmaps/IO/ArchiveReader.cs | 6 +- osu.Game/Graphics/OsuColour.cs | 92 +++++++++---------- osu.Game/Online/Chat/Channel.cs | 2 +- osu.Game/Overlays/Mods/ModButton.cs | 2 +- osu.Game/Screens/Menu/OsuLogo.cs | 2 +- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/osu.Desktop/Beatmaps/IO/LegacyFilesystemReader.cs b/osu.Desktop/Beatmaps/IO/LegacyFilesystemReader.cs index abc45d82ec..8c896646bf 100644 --- a/osu.Desktop/Beatmaps/IO/LegacyFilesystemReader.cs +++ b/osu.Desktop/Beatmaps/IO/LegacyFilesystemReader.cs @@ -14,7 +14,7 @@ namespace osu.Desktop.Beatmaps.IO { public static void Register() => AddReader((storage, path) => Directory.Exists(path)); - private string basePath { get; } + private readonly string basePath; public LegacyFilesystemReader(string path) { diff --git a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs index cc9d367a59..21a3ab9842 100644 --- a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs @@ -11,7 +11,7 @@ namespace osu.Game.Beatmaps.Formats { public abstract class BeatmapDecoder { - private static Dictionary decoders { get; } = new Dictionary(); + private static readonly Dictionary decoders = new Dictionary(); public static BeatmapDecoder GetDecoder(StreamReader stream) { diff --git a/osu.Game/Beatmaps/IO/ArchiveReader.cs b/osu.Game/Beatmaps/IO/ArchiveReader.cs index 6c6b6be23c..9245c914a6 100644 --- a/osu.Game/Beatmaps/IO/ArchiveReader.cs +++ b/osu.Game/Beatmaps/IO/ArchiveReader.cs @@ -13,11 +13,11 @@ namespace osu.Game.Beatmaps.IO { private class Reader { - public Func Test { get; set; } - public Type Type { get; set; } + public Func Test; + public Type Type; } - private static List readers { get; } = new List(); + private static readonly List readers = new List(); public static ArchiveReader GetReader(Storage storage, string path) { diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index 15ffefc45d..b666442f19 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -33,57 +33,57 @@ namespace osu.Game.Graphics } // See https://github.com/ppy/osu-web/blob/master/resources/assets/less/colors.less - public Color4 PurpleLighter = FromHex(@"eeeeff"); - public Color4 PurpleLight = FromHex(@"aa88ff"); - public Color4 Purple = FromHex(@"8866ee"); - public Color4 PurpleDark = FromHex(@"6644cc"); - public Color4 PurpleDarker = FromHex(@"441188"); + public readonly Color4 PurpleLighter = FromHex(@"eeeeff"); + public readonly Color4 PurpleLight = FromHex(@"aa88ff"); + public readonly Color4 Purple = FromHex(@"8866ee"); + public readonly Color4 PurpleDark = FromHex(@"6644cc"); + public readonly Color4 PurpleDarker = FromHex(@"441188"); - public Color4 PinkLighter = FromHex(@"ffddee"); - public Color4 PinkLight = FromHex(@"ff99cc"); - public Color4 Pink = FromHex(@"ff66aa"); - public Color4 PinkDark = FromHex(@"cc5288"); - public Color4 PinkDarker = FromHex(@"bb1177"); + public readonly Color4 PinkLighter = FromHex(@"ffddee"); + public readonly Color4 PinkLight = FromHex(@"ff99cc"); + public readonly Color4 Pink = FromHex(@"ff66aa"); + public readonly Color4 PinkDark = FromHex(@"cc5288"); + public readonly Color4 PinkDarker = FromHex(@"bb1177"); - public Color4 BlueLighter = FromHex(@"ddffff"); - public Color4 BlueLight = FromHex(@"99eeff"); - public Color4 Blue = FromHex(@"66ccff"); - public Color4 BlueDark = FromHex(@"44aadd"); - public Color4 BlueDarker = FromHex(@"2299bb"); + public readonly Color4 BlueLighter = FromHex(@"ddffff"); + public readonly Color4 BlueLight = FromHex(@"99eeff"); + public readonly Color4 Blue = FromHex(@"66ccff"); + public readonly Color4 BlueDark = FromHex(@"44aadd"); + public readonly Color4 BlueDarker = FromHex(@"2299bb"); - public Color4 YellowLighter = FromHex(@"ffffdd"); - public Color4 YellowLight = FromHex(@"ffdd55"); - public Color4 Yellow = FromHex(@"ffcc22"); - public Color4 YellowDark = FromHex(@"eeaa00"); - public Color4 YellowDarker = FromHex(@"cc6600"); + public readonly Color4 YellowLighter = FromHex(@"ffffdd"); + public readonly Color4 YellowLight = FromHex(@"ffdd55"); + public readonly Color4 Yellow = FromHex(@"ffcc22"); + public readonly Color4 YellowDark = FromHex(@"eeaa00"); + public readonly Color4 YellowDarker = FromHex(@"cc6600"); - public Color4 GreenLighter = FromHex(@"eeffcc"); - public Color4 GreenLight = FromHex(@"b3d944"); - public Color4 Green = FromHex(@"88b300"); - public Color4 GreenDark = FromHex(@"668800"); - public Color4 GreenDarker = FromHex(@"445500"); + public readonly Color4 GreenLighter = FromHex(@"eeffcc"); + public readonly Color4 GreenLight = FromHex(@"b3d944"); + public readonly Color4 Green = FromHex(@"88b300"); + public readonly Color4 GreenDark = FromHex(@"668800"); + public readonly Color4 GreenDarker = FromHex(@"445500"); - public Color4 Gray0 = FromHex(@"000"); - public Color4 Gray1 = FromHex(@"111"); - public Color4 Gray2 = FromHex(@"222"); - public Color4 Gray3 = FromHex(@"333"); - public Color4 Gray4 = FromHex(@"444"); - public Color4 Gray5 = FromHex(@"555"); - public Color4 Gray6 = FromHex(@"666"); - public Color4 Gray7 = FromHex(@"777"); - public Color4 Gray8 = FromHex(@"888"); - public Color4 Gray9 = FromHex(@"999"); - public Color4 GrayA = FromHex(@"aaa"); - public Color4 GrayB = FromHex(@"bbb"); - public Color4 GrayC = FromHex(@"ccc"); - public Color4 GrayD = FromHex(@"ddd"); - public Color4 GrayE = FromHex(@"eee"); - public Color4 GrayF = FromHex(@"fff"); + public readonly Color4 Gray0 = FromHex(@"000"); + public readonly Color4 Gray1 = FromHex(@"111"); + public readonly Color4 Gray2 = FromHex(@"222"); + public readonly Color4 Gray3 = FromHex(@"333"); + public readonly Color4 Gray4 = FromHex(@"444"); + public readonly Color4 Gray5 = FromHex(@"555"); + public readonly Color4 Gray6 = FromHex(@"666"); + public readonly Color4 Gray7 = FromHex(@"777"); + public readonly Color4 Gray8 = FromHex(@"888"); + public readonly Color4 Gray9 = FromHex(@"999"); + public readonly Color4 GrayA = FromHex(@"aaa"); + public readonly Color4 GrayB = FromHex(@"bbb"); + public readonly Color4 GrayC = FromHex(@"ccc"); + public readonly Color4 GrayD = FromHex(@"ddd"); + public readonly Color4 GrayE = FromHex(@"eee"); + public readonly Color4 GrayF = FromHex(@"fff"); - public Color4 RedLighter = FromHex(@"ffeded"); - public Color4 RedLight = FromHex(@"ed7787"); - public Color4 Red = FromHex(@"ed1121"); - public Color4 RedDark = FromHex(@"ba0011"); - public Color4 RedDarker = FromHex(@"870000"); + public readonly Color4 RedLighter = FromHex(@"ffeded"); + public readonly Color4 RedLight = FromHex(@"ed7787"); + public readonly Color4 Red = FromHex(@"ed1121"); + public readonly Color4 RedDark = FromHex(@"ba0011"); + public readonly Color4 RedDarker = FromHex(@"870000"); } } diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index 04ebf0a389..d3bd57a1c9 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -23,7 +23,7 @@ namespace osu.Game.Online.Chat [JsonProperty(@"channel_id")] public int Id; - public SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); + public readonly SortedList Messages = new SortedList((m1, m2) => m1.Id.CompareTo(m2.Id)); //internal bool Joined; diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index f380c19d8a..d7a91e2caa 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Mods { public class ModButton : FillFlowContainer { - private ModIcon foregroundIcon { get; set; } + private ModIcon foregroundIcon; private readonly SpriteText text; private readonly Container iconsContainer; private SampleChannel sampleOn, sampleOff; diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 29f6cb2967..f3fffedd43 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -22,7 +22,7 @@ namespace osu.Game.Screens.Menu /// public class OsuLogo : Container { - public Color4 OsuPink = OsuColour.FromHex(@"e967a1"); + public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1"); private readonly Sprite logo; private readonly CircularContainer logoContainer; From 345f80b775e805d4e4465b20285fc6afef8ab98c Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:30:55 +0800 Subject: [PATCH 3/7] Simplify constructor of SampleInfoList. --- osu.Game/Audio/SampleInfoList.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Audio/SampleInfoList.cs b/osu.Game/Audio/SampleInfoList.cs index 594341bbb1..06dd716a4a 100644 --- a/osu.Game/Audio/SampleInfoList.cs +++ b/osu.Game/Audio/SampleInfoList.cs @@ -11,9 +11,8 @@ namespace osu.Game.Audio { } - public SampleInfoList(IEnumerable elements) + public SampleInfoList(IEnumerable elements) : base(elements) { - AddRange(elements); } } } \ No newline at end of file From e466380ee24352926fde9f4a2cba400eb88eb0c3 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:33:37 +0800 Subject: [PATCH 4/7] Generic infer for IJsonSerializable.DeepClone. --- osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs | 2 +- osu.Game/IO/Serialization/IJsonSerializable.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 0784c94059..355ce1cf68 100644 --- a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps protected override Beatmap ConvertBeatmap(Beatmap original) { // Rewrite the beatmap info to add the slider velocity multiplier - BeatmapInfo info = original.BeatmapInfo.DeepClone(); + BeatmapInfo info = original.BeatmapInfo.DeepClone(); info.Difficulty.SliderMultiplier *= legacy_velocity_multiplier; Beatmap converted = base.ConvertBeatmap(original); diff --git a/osu.Game/IO/Serialization/IJsonSerializable.cs b/osu.Game/IO/Serialization/IJsonSerializable.cs index 33d0801e47..7dbc860979 100644 --- a/osu.Game/IO/Serialization/IJsonSerializable.cs +++ b/osu.Game/IO/Serialization/IJsonSerializable.cs @@ -16,12 +16,13 @@ namespace osu.Game.IO.Serialization return JsonConvert.SerializeObject(obj); } - public static T Deserialize(string objString) + public static T Deserialize(this string objString) { return JsonConvert.DeserializeObject(objString); } - public static T DeepClone(this IJsonSerializable obj) + public static T DeepClone(this T obj) + where T : IJsonSerializable { return Deserialize(Serialize(obj)); } From ced2332d20df70866b9fd458a5127de8aa0f59d7 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:37:41 +0800 Subject: [PATCH 5/7] Handle overlay in ToolbarOverlayToggleButton. --- osu.Game/Overlays/Toolbar/ToolbarChatButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs | 1 + osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs | 1 - 5 files changed, 1 insertion(+), 4 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs b/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs index ca612662e1..39909b8d5b 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarChatButton.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar private void load(ChatOverlay chat) { StateContainer = chat; - Action = chat.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index 725af09ee7..82599b9a0d 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs @@ -17,7 +17,6 @@ namespace osu.Game.Overlays.Toolbar private void load(MusicController music) { StateContainer = music; - Action = music.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs b/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs index 4da87a0568..5126f6a2a4 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarNotificationButton.cs @@ -22,7 +22,6 @@ namespace osu.Game.Overlays.Toolbar private void load(NotificationManager notificationManager) { StateContainer = notificationManager; - Action = notificationManager.ToggleVisibility; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs b/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs index 023d9cfea7..fa668bad60 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarOverlayToggleButton.cs @@ -21,6 +21,7 @@ namespace osu.Game.Overlays.Toolbar set { stateContainer = value; + Action = stateContainer.ToggleVisibility; stateContainer.StateChanged += stateChanged; } } diff --git a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs index 9f8170b604..ae54b98aca 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarSettingsButton.cs @@ -19,7 +19,6 @@ namespace osu.Game.Overlays.Toolbar private void load(OptionsOverlay options) { StateContainer = options; - Action = options.ToggleVisibility; } } } \ No newline at end of file From 01616cc27c59f5e1eb91eea322330b7e2cf46c1b Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:41:22 +0800 Subject: [PATCH 6/7] Avoid extra MemoryStream in ArchiveReader. --- osu.Game/Beatmaps/IO/ArchiveReader.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/osu.Game/Beatmaps/IO/ArchiveReader.cs b/osu.Game/Beatmaps/IO/ArchiveReader.cs index 9245c914a6..9d7d67007e 100644 --- a/osu.Game/Beatmaps/IO/ArchiveReader.cs +++ b/osu.Game/Beatmaps/IO/ArchiveReader.cs @@ -58,11 +58,9 @@ namespace osu.Game.Beatmaps.IO if (input == null) return null; - using (MemoryStream ms = new MemoryStream()) - { - input.CopyTo(ms); - return ms.ToArray(); - } + byte[] buffer = new byte[input.Length]; + input.Read(buffer, 0, buffer.Length); + return buffer; } } } From cb21e98ae15636e6fe3b9ce871829189950a5676 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 8 May 2017 19:55:04 +0800 Subject: [PATCH 7/7] MatchCreate.ValidForResume = false. --- osu.Game/Screens/Multiplayer/MatchCreate.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Screens/Multiplayer/MatchCreate.cs b/osu.Game/Screens/Multiplayer/MatchCreate.cs index 54800c82f3..f28261fa7f 100644 --- a/osu.Game/Screens/Multiplayer/MatchCreate.cs +++ b/osu.Game/Screens/Multiplayer/MatchCreate.cs @@ -11,5 +11,10 @@ namespace osu.Game.Screens.Multiplayer protected override IEnumerable PossibleChildren => new[] { typeof(Match) }; + + public MatchCreate() + { + ValidForResume = false; + } } }