From fd12db9f69591dfcc8d07f366cdc37fcee424bc4 Mon Sep 17 00:00:00 2001 From: muskit <15199219+muskit@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:22:55 -0700 Subject: [PATCH] fix duplicate-timed time measure parsing --- Scripts/Data/Chart/Chart.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/Data/Chart/Chart.cs b/Scripts/Data/Chart/Chart.cs index c676a4a..2bcbe79 100644 --- a/Scripts/Data/Chart/Chart.cs +++ b/Scripts/Data/Chart/Chart.cs @@ -131,13 +131,15 @@ namespace WacK.Data.Chart else // TODO: handle denominator (note that gets the beat) queuedBPM = int.Parse(chartNote.Item2.value.Split()[0]); - timeSigChgs.Add( + // FIXME: keep last instance encountered on the same time + timeSigChgs.TryAdd( curTime, new NoteEvent<(int, int)> ( curTime, mb, NoteEventType.TimeSignature, value: (nu, de) - )); + ) + ); break; // Playable notes case MerType.Touch: