Skip to content

Commit

Permalink
fix section skip on bpm changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github authored Aug 12, 2021
1 parent 0c925f3 commit fc85f3e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1217,13 +1217,15 @@ class ChartingState extends MusicBeatState
note[1] += 4;
else
note[1] -= 4;
secit.sectionNotes[i] = note;
newSwaps.push(note);
}

secit.sectionNotes = newSwaps;

for (i in shownNotes)
{
for(ii in newSwaps)
if (i.strumTime == ii[0])
if (i.strumTime == ii[0] && i.noteData == ii[1] % 4)
{
i.x = Math.floor(ii[1] * GRID_SIZE);

Expand Down Expand Up @@ -1312,7 +1314,7 @@ class ChartingState extends MusicBeatState
if (data == null)
return;

FlxG.sound.music.time = (beat / (data.bpm / 60)) * 1000;
FlxG.sound.music.time = (data.startBeat + (beat - data.startBeat) / (data.bpm / 60)) * 1000;
if (!PlayState.isSM)
vocals.time = FlxG.sound.music.time;
curSection = section;
Expand Down Expand Up @@ -2308,13 +2310,15 @@ class ChartingState extends MusicBeatState
note[1] += 4;
else
note[1] -= 4;
secit.sectionNotes[i] = note;
newSwaps.push(note);
}

secit.sectionNotes = newSwaps;

for (i in shownNotes)
{
for(ii in newSwaps)
if (i.strumTime == ii[0])
if (i.strumTime == ii[0] && i.noteData == ii[1] % 4)
{
i.x = Math.floor(ii[1] * GRID_SIZE);

Expand Down

0 comments on commit fc85f3e

Please sign in to comment.