From 9155f566ecb11cf9da75729c93161f4ae2d38fec Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 30 Jun 2025 16:09:23 +0900 Subject: [PATCH] Fix random sound effect not playing correctly --- osu.Game/Screens/SelectV2/BeatmapCarousel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs index b09490ce32..d33d5dbd87 100644 --- a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs @@ -667,7 +667,9 @@ namespace osu.Game.Screens.SelectV2 return false; } - Scheduler.Add(() => + // CurrentSelectionItem won't be valid until UpdaterAfterChildren. + // We probably want to fix this at some point since a few places are working-around this quirk. + ScheduleAfterChildren(() => { if (selectionBefore != null && CurrentSelectionItem != null) playSpinSample(distanceBetween(selectionBefore, CurrentSelectionItem), carouselItems.Count);