Skip to content

Commit

Permalink
Fixed star power length calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
RileyTheFox committed Apr 28, 2023
1 parent cc87fd8 commit d34603a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Assets/Script/Data/YargChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ private List<NoteInfo>[] LoadArray(ref List<NoteInfo>[] notes, IChartLoader<Note
foreach (var sp in chart.starPower) {
string name = GetNameFromInstrument(instrument, isPro, isGh);

events.Add(new EventInfo($"starpower_{name}", (float)sp.time, (float)_song.TickToTime(sp.length - 1)));
float finishTime = (float)_song.TickToTime(sp.tick + sp.length - 1);

events.Add(new EventInfo($"starpower_{name}", (float)sp.time, finishTime - (float)sp.time));
}

for (int i = 0; i < chart.events.Count; i++) {
Expand Down

0 comments on commit d34603a

Please sign in to comment.