From 652f273961b329b744744faa5206d28581f5ac95 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 19 Jan 2018 15:46:42 +0900 Subject: [PATCH 01/13] Ensure previews stop playing when they are removed from the draw hierarchy --- osu.Game/Overlays/Direct/DirectPanel.cs | 2 ++ osu.Game/Overlays/Direct/PlayButton.cs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7dd6be8dc6..7da6f1ce2f 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -106,6 +106,8 @@ namespace osu.Game.Overlays.Direct beatmaps.BeatmapDownloadBegan += attachDownload; } + public override bool DisposeOnDeathRemoval => true; + protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); diff --git a/osu.Game/Overlays/Direct/PlayButton.cs b/osu.Game/Overlays/Direct/PlayButton.cs index c00fb9b122..1d67bc2d90 100644 --- a/osu.Game/Overlays/Direct/PlayButton.cs +++ b/osu.Game/Overlays/Direct/PlayButton.cs @@ -145,6 +145,12 @@ namespace osu.Game.Overlays.Direct } } + protected override void Dispose(bool isDisposing) + { + base.Dispose(isDisposing); + Playing.Value = false; + } + private TrackLoader trackLoader; private AudioManager audio; From 4d1142a0ce1650573523b0dd6e37f59cd977dbcd Mon Sep 17 00:00:00 2001 From: Shawdooow Date: Fri, 19 Jan 2018 11:11:28 -0500 Subject: [PATCH 02/13] overall difficulty --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 2d1331d30a..c14ef9c2ea 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -16,9 +16,9 @@ namespace osu.Game.Rulesets.Osu.Objects public const double OBJECT_RADIUS = 64; private const double hittable_range = 300; - private const double hit_window_50 = 150; - private const double hit_window_100 = 80; - private const double hit_window_300 = 30; + public double HitWindow50 = 150; + public double HitWindow100 = 80; + public double HitWindow300 = 30; public float TimePreempt = 600; public float TimeFadein = 400; @@ -50,13 +50,13 @@ namespace osu.Game.Rulesets.Osu.Objects switch (result) { default: - return 300; + return hittable_range; case HitResult.Meh: - return 150; + return HitWindow50; case HitResult.Good: - return 80; + return HitWindow100; case HitResult.Great: - return 30; + return HitWindow300; } } @@ -78,6 +78,10 @@ namespace osu.Game.Rulesets.Osu.Objects TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450); TimeFadein = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1200, 800, 300); + HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 99.5, 149.5, 199.5); + HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 59.5, 99.5, 139.5); + HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 19.5, 49.5, 79.5); + Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2; } } From e109d5fe208cf28935edf583a5ca1c7706d70410 Mon Sep 17 00:00:00 2001 From: Shawdooow Date: Fri, 19 Jan 2018 11:13:49 -0500 Subject: [PATCH 03/13] fix slider heads --- osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index eb499b5da6..232964587c 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -60,7 +60,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables Samples = s.Samples, SampleControlPoint = s.SampleControlPoint, TimePreempt = s.TimePreempt, - TimeFadein = s.TimeFadein + TimeFadein = s.TimeFadein, + HitWindow300 = s.HitWindow300, + HitWindow100 = s.HitWindow100, + HitWindow50 = s.HitWindow50 }) }; From 596044e19d79ef0e16908426201a7c97eb8e77da Mon Sep 17 00:00:00 2001 From: Aergwyn Date: Fri, 19 Jan 2018 17:25:32 +0100 Subject: [PATCH 04/13] show beatmapsets with pending deletion in osu!direct --- osu.Game/Overlays/DirectOverlay.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/DirectOverlay.cs b/osu.Game/Overlays/DirectOverlay.cs index d5acb9dc86..efd54bec82 100644 --- a/osu.Game/Overlays/DirectOverlay.cs +++ b/osu.Game/Overlays/DirectOverlay.cs @@ -298,13 +298,15 @@ namespace osu.Game.Overlays Task.Run(() => { var onlineIds = response.Select(r => r.OnlineBeatmapSetID).ToList(); - var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).Select(r => r.OnlineBeatmapSetID).ToList(); - var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList(); + var presentSets = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).ToList(); + + var responseSets = response.Select(r => r.ToBeatmapSet(rulesets)).ToList(); + var finalSets = responseSets.Where(b => !presentSets.Any(s => s.OnlineBeatmapSetID == b.OnlineBeatmapSetID && !s.DeletePending)).ToList(); // may not need scheduling; loads async internally. Schedule(() => { - BeatmapSets = sets; + BeatmapSets = finalSets; recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value); }); }); From c29eea870d8bcbf87d6b16ec68cb8504070de514 Mon Sep 17 00:00:00 2001 From: Shawdooow Date: Fri, 19 Jan 2018 20:56:41 -0500 Subject: [PATCH 05/13] correct values --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index c14ef9c2ea..57ad2717e6 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -78,9 +78,9 @@ namespace osu.Game.Rulesets.Osu.Objects TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450); TimeFadein = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1200, 800, 300); - HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 99.5, 149.5, 199.5); - HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 59.5, 99.5, 139.5); - HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 19.5, 49.5, 79.5); + HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 100, 150, 200); + HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 60, 100, 140); + HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 20, 50, 80); Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2; } From 29466438a3e95c10734472a7746e0d486373134c Mon Sep 17 00:00:00 2001 From: Shawdooow Date: Fri, 19 Jan 2018 20:58:43 -0500 Subject: [PATCH 06/13] fix values --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 57ad2717e6..0e7c2f3d4d 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -78,9 +78,9 @@ namespace osu.Game.Rulesets.Osu.Objects TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450); TimeFadein = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1200, 800, 300); - HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 100, 150, 200); - HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 60, 100, 140); - HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 20, 50, 80); + HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 200, 150, 100); + HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 140, 100, 60); + HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 80, 50, 20); Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2; } From 060d80efbe96e7248b0675247b1475f842408bab Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:05:07 +0900 Subject: [PATCH 07/13] Continue showing progress bar on direct panels when importing Previously the progrress bar would fade out once downloads completed, which felt unintuitive. --- osu.Game/Graphics/UserInterface/ProgressBar.cs | 2 +- osu.Game/Overlays/Direct/DirectPanel.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/ProgressBar.cs b/osu.Game/Graphics/UserInterface/ProgressBar.cs index 43fab9fead..6021cf08be 100644 --- a/osu.Game/Graphics/UserInterface/ProgressBar.cs +++ b/osu.Game/Graphics/UserInterface/ProgressBar.cs @@ -18,7 +18,7 @@ namespace osu.Game.Graphics.UserInterface public Color4 FillColour { - set { fill.Colour = value; } + set { fill.FadeColour(value, 150, Easing.OutQuint); } } public Color4 BackgroundColour diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7dd6be8dc6..7e7e8d8665 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -65,11 +65,14 @@ namespace osu.Game.Overlays.Direct Colour = Color4.Black.Opacity(0.3f), }; + private OsuColour colours; + [BackgroundDependencyLoader(permitNulls: true)] private void load(BeatmapManager beatmaps, OsuColour colours, BeatmapSetOverlay beatmapSetOverlay) { this.beatmaps = beatmaps; this.beatmapSetOverlay = beatmapSetOverlay; + this.colours = colours; AddInternal(content = new Container { @@ -188,7 +191,7 @@ namespace osu.Game.Overlays.Direct request.Success += data => { progressBar.Current.Value = 1; - progressBar.FadeOut(500); + progressBar.FillColour = colours.Yellow; }; } From 88beee2d1fad2db1c30acc39d8cb6e50a7a9d4f7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:17:03 +0900 Subject: [PATCH 08/13] Keep downloads active until their associated import operation finishes This avoids race conditions where a second download can potentially be started while the first is still active. --- osu.Game/Beatmaps/BeatmapManager.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 634b5bcd20..e6ddf4bfd9 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -287,9 +287,8 @@ namespace osu.Game.Beatmaps Import(archive); downloadNotification.State = ProgressNotificationState.Completed; + currentDownloads.Remove(request); }, TaskCreationOptions.LongRunning); - - currentDownloads.Remove(request); }; request.Failure += data => From 9405f349fc1b2828f1324369a5c710adc6a67482 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 22 Jan 2018 13:21:35 +0900 Subject: [PATCH 09/13] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 8f36ddab94..26c01ca606 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 8f36ddab946ff538620081ede7719461d4732b79 +Subproject commit 26c01ca6069296621f76d8ffbfe31ecf8074c687 From 53e40a77dcb3870d74dd616ce4c29a33ada29106 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:25:49 +0900 Subject: [PATCH 10/13] Don't show error messages when a download is user-cancelled Resolves #1941. --- osu.Game/Beatmaps/BeatmapManager.cs | 6 ++++-- osu.Game/Overlays/Direct/DirectPanel.cs | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 634b5bcd20..fa20f779a4 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -292,10 +292,12 @@ namespace osu.Game.Beatmaps currentDownloads.Remove(request); }; - request.Failure += data => + request.Failure += error => { + if (error is OperationCanceledException) return; + downloadNotification.State = ProgressNotificationState.Completed; - Logger.Error(data, "Failed to get beatmap download information"); + Logger.Error(error, "Beatmap download failed!"); currentDownloads.Remove(request); }; diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 7dd6be8dc6..64a36f5671 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -180,7 +180,6 @@ namespace osu.Game.Overlays.Direct { progressBar.Current.Value = 0; progressBar.FadeOut(500); - Logger.Error(e, "Failed to get beatmap download information"); }; request.DownloadProgressed += progress => progressBar.Current.Value = progress; From 4780c3f8c6d41a36762b31629e7cfc8b6fd09c20 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 22 Jan 2018 13:41:47 +0900 Subject: [PATCH 11/13] Disable TestCaseWaveform --- osu.Game.Tests/Visual/TestCaseWaveform.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game.Tests/Visual/TestCaseWaveform.cs b/osu.Game.Tests/Visual/TestCaseWaveform.cs index 87492e2332..dd5420400f 100644 --- a/osu.Game.Tests/Visual/TestCaseWaveform.cs +++ b/osu.Game.Tests/Visual/TestCaseWaveform.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using NUnit.Framework; using OpenTK; using OpenTK.Graphics; using osu.Framework.Allocation; @@ -15,6 +16,7 @@ using osu.Game.Screens.Edit.Screens.Compose.Timeline; namespace osu.Game.Tests.Visual { + [Ignore("CI regularly hangs on this TestCase...")] public class TestCaseWaveform : OsuTestCase { private readonly Bindable beatmapBacking = new Bindable(); From 3d4e2d400cd9896803a2dbf0ce31f928f40b20a6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:52:10 +0900 Subject: [PATCH 12/13] Remove unused using --- osu.Game/Overlays/Direct/DirectPanel.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 64a36f5671..9249c5a2c4 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -16,7 +16,6 @@ using osu.Game.Graphics.Sprites; using OpenTK.Graphics; using osu.Framework.Input; using osu.Game.Graphics.UserInterface; -using osu.Framework.Logging; using osu.Game.Online.API.Requests; using osu.Framework.Configuration; using osu.Framework.Audio.Track; From 82c882288824696b0e6011f9ee57e38ad3bdf2b4 Mon Sep 17 00:00:00 2001 From: Aergwyn Date: Mon, 22 Jan 2018 08:04:14 +0100 Subject: [PATCH 13/13] we need to go back reverted change and instead check `DeletePending` when retrieving existing online IDs --- osu.Game/Overlays/DirectOverlay.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/DirectOverlay.cs b/osu.Game/Overlays/DirectOverlay.cs index efd54bec82..05b5bba09c 100644 --- a/osu.Game/Overlays/DirectOverlay.cs +++ b/osu.Game/Overlays/DirectOverlay.cs @@ -298,15 +298,13 @@ namespace osu.Game.Overlays Task.Run(() => { var onlineIds = response.Select(r => r.OnlineBeatmapSetID).ToList(); - var presentSets = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).ToList(); - - var responseSets = response.Select(r => r.ToBeatmapSet(rulesets)).ToList(); - var finalSets = responseSets.Where(b => !presentSets.Any(s => s.OnlineBeatmapSetID == b.OnlineBeatmapSetID && !s.DeletePending)).ToList(); + var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID) && !s.DeletePending).Select(r => r.OnlineBeatmapSetID).ToList(); + var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList(); // may not need scheduling; loads async internally. Schedule(() => { - BeatmapSets = finalSets; + BeatmapSets = sets; recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value); }); });