From 53671ad11eed29e89ad6bff674cce505f09a43ed Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Oct 2024 00:35:18 +0900 Subject: [PATCH] Only update beatmaps which actually had offsets Without this every beatmap gets a write and it reloads the whole of song select, basically. --- osu.Game/Beatmaps/BeatmapManager.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index f72741af16..4191771116 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -285,7 +285,8 @@ namespace osu.Game.Beatmaps /// /// The query. /// The first result for the provided query, or null if no results were found. - public BeatmapInfo? QueryBeatmap(Expression> query) => Realm.Run(r => r.All().Filter($"{nameof(BeatmapInfo.BeatmapSet)}.{nameof(BeatmapSetInfo.DeletePending)} == false").FirstOrDefault(query)?.Detach()); + public BeatmapInfo? QueryBeatmap(Expression> query) => Realm.Run(r => + r.All().Filter($"{nameof(BeatmapInfo.BeatmapSet)}.{nameof(BeatmapSetInfo.DeletePending)} == false").FirstOrDefault(query)?.Detach()); /// /// A default representation of a WorkingBeatmap to use when no beatmap is available. @@ -322,7 +323,8 @@ namespace osu.Game.Beatmaps foreach (var beatmap in items) { - beatmap.UserSettings.Offset = 0.0; + if (beatmap.UserSettings.Offset != 0) + beatmap.UserSettings.Offset = 0; } PostNotification?.Invoke(new ProgressCompletionNotification { Text = reset_complete_message });