Skip to content

Commit

Permalink
Fix zero length holds being created
Browse files Browse the repository at this point in the history
  • Loading branch information
tillvit committed Jan 10, 2024
1 parent 7743ada commit 8d93b7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/chart/ChartManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,17 @@ export class ChartManager {
hold.endBeat = Math.max(hold.startBeat, Math.round(beat * 48) / 48)
hold.roll ||= roll
if (!hold.originalNote) {
this.loadedChart.addNote({
const note: PartialNotedataEntry = {
beat: hold.startBeat,
col: col,
type: hold.roll ? "Roll" : "Hold",
hold: hold.endBeat - hold.startBeat,
})
}
if (hold.endBeat - hold.startBeat == 0) {
note.type = "Tap"
Object.assign(note, { hold: undefined })
}
this.loadedChart.addNote(note)
} else {
const props: Partial<PartialNotedataEntry> = {
beat: hold.startBeat,
Expand Down

0 comments on commit 8d93b7e

Please sign in to comment.