diff --git a/.gitignore b/.gitignore index 59fb2c28..ad720ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ latest/windows/haxe/ .haxelib/ pages/ docs/doc.xml -mods/Baldi's Basics in Funkin'/ \ No newline at end of file +mods/ \ No newline at end of file diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index d7560228..1a16068f 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -109,7 +109,7 @@ class FNFLegacyParser { }); } - if (section.sectionBeats != beatsPerMeasure) { + if (section.sectionBeats != null && section.sectionBeats != beatsPerMeasure) { beatsPerMeasure = section.sectionBeats != null ? section.sectionBeats : data.beatsPerMeasure.getDefault(4); result.events.push({ diff --git a/source/funkin/backend/system/Conductor.hx b/source/funkin/backend/system/Conductor.hx index 307e07cb..7ca9858f 100644 --- a/source/funkin/backend/system/Conductor.hx +++ b/source/funkin/backend/system/Conductor.hx @@ -11,7 +11,7 @@ class BPMChangeEvent { public var songTime:Float; public var bpm:Float; public var beatsPerMeasure:Float; - public var stepsPerBeat:Float; + public var stepsPerBeat:Int; } final class Conductor @@ -48,7 +48,7 @@ final class Conductor /** * Number of steps per beat (bottom number in time signature). Defaults to 4. */ - public static var stepsPerBeat:Float = 4; + public static var stepsPerBeat:Int = 4; /** @@ -137,7 +137,7 @@ final class Conductor var curBPM:Float = song.meta.bpm; var curBeatsPerMeasure:Float = song.meta.beatsPerMeasure.getDefault(4); - var curStepsPerBeat:Float = song.meta.stepsPerBeat.getDefault(4); + var curStepsPerBeat:Int = song.meta.stepsPerBeat.getDefault(4); var songTime:Float = 0; var stepTime:Float = 0; @@ -305,7 +305,7 @@ final class Conductor } } - public static function changeBPM(newBpm:Float, newBeatsPerMeasure:Float = 4, newStepsPerBeat:Float = 4) + public static function changeBPM(newBpm:Float, newBeatsPerMeasure:Float = 4, newStepsPerBeat:Int = 4) { var timesignChange = (beatsPerMeasure != newBeatsPerMeasure || stepsPerBeat != newStepsPerBeat); var bpmChange = (bpm != newBpm);