From c5b6908e71cdeaadad6f52b531a2e30c9b8158b9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 8 Nov 2020 00:17:23 +0900 Subject: [PATCH] Always write [HitObjects] to file I think this is expected. If not, there's an alternative solution. --- osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs b/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs index 80fd6c22bb..7ddb0b4caa 100644 --- a/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs @@ -235,11 +235,11 @@ namespace osu.Game.Beatmaps.Formats private void handleHitObjects(TextWriter writer) { + writer.WriteLine("[HitObjects]"); + if (beatmap.HitObjects.Count == 0) return; - writer.WriteLine("[HitObjects]"); - foreach (var h in beatmap.HitObjects) handleHitObject(writer, h); }