Skip to content

Commit cc83f26

Browse files
committed
chart parsing fix maybe? Changing stepsPerBeat to an Int
1 parent ea493cd commit cc83f26

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ latest/windows/haxe/
88
.haxelib/
99
pages/
1010
docs/doc.xml
11-
mods/Baldi's Basics in Funkin'/
11+
mods/

Diff for: source/funkin/backend/chart/FNFLegacyParser.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class FNFLegacyParser {
109109
});
110110
}
111111

112-
if (section.sectionBeats != beatsPerMeasure) {
112+
if (section.sectionBeats != null && section.sectionBeats != beatsPerMeasure) {
113113
beatsPerMeasure = section.sectionBeats != null ? section.sectionBeats : data.beatsPerMeasure.getDefault(4);
114114

115115
result.events.push({

Diff for: source/funkin/backend/system/Conductor.hx

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class BPMChangeEvent {
1111
public var songTime:Float;
1212
public var bpm:Float;
1313
public var beatsPerMeasure:Float;
14-
public var stepsPerBeat:Float;
14+
public var stepsPerBeat:Int;
1515
}
1616

1717
final class Conductor
@@ -48,7 +48,7 @@ final class Conductor
4848
/**
4949
* Number of steps per beat (bottom number in time signature). Defaults to 4.
5050
*/
51-
public static var stepsPerBeat:Float = 4;
51+
public static var stepsPerBeat:Int = 4;
5252

5353

5454
/**
@@ -137,7 +137,7 @@ final class Conductor
137137

138138
var curBPM:Float = song.meta.bpm;
139139
var curBeatsPerMeasure:Float = song.meta.beatsPerMeasure.getDefault(4);
140-
var curStepsPerBeat:Float = song.meta.stepsPerBeat.getDefault(4);
140+
var curStepsPerBeat:Int = song.meta.stepsPerBeat.getDefault(4);
141141
var songTime:Float = 0;
142142
var stepTime:Float = 0;
143143

@@ -305,7 +305,7 @@ final class Conductor
305305
}
306306
}
307307

308-
public static function changeBPM(newBpm:Float, newBeatsPerMeasure:Float = 4, newStepsPerBeat:Float = 4)
308+
public static function changeBPM(newBpm:Float, newBeatsPerMeasure:Float = 4, newStepsPerBeat:Int = 4)
309309
{
310310
var timesignChange = (beatsPerMeasure != newBeatsPerMeasure || stepsPerBeat != newStepsPerBeat);
311311
var bpmChange = (bpm != newBpm);

0 commit comments

Comments
 (0)