From 82e4e884d7a3c8ac81b52c0f16b93c5f06a81810 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Thu, 4 Jul 2024 15:51:50 +0900 Subject: [PATCH] Change overlapping `Duck()` usages to be a noop instead of a throw --- osu.Game/Overlays/MusicController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 2952d9d18e..8b52c59bae 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -267,8 +267,7 @@ namespace osu.Game.Overlays /// Easing for the unducking transition. public IDisposable Duck(int duration = 0, float duckVolumeTo = 0.25f, int? duckCutoffTo = 300, Easing easing = Easing.OutCubic, int unduckDuration = 500, Easing unduckEasing = Easing.InCubic) { - if (audioDuckActive) - throw new InvalidOperationException("Cannot perform Duck() while another Duck() is in progress."); + if (audioDuckActive) return null; audioDuckActive = true;