Skip to content

Commit

Permalink
note quant fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshubs authored and Yoshubs committed Nov 26, 2021
1 parent ec7239b commit 0e0b89e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion source/gameObjects/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ class Character extends FNFSprite

override public function playAnim(AnimName:String, Force:Bool = false, Reversed:Bool = false, Frame:Int = 0):Void
{
super.playAnim(AnimName, Force, Reversed, Frame);
if (animation.getByName(AnimName) != null)
super.playAnim(AnimName, Force, Reversed, Frame);

if (curCharacter == 'gf')
{
Expand Down
8 changes: 7 additions & 1 deletion source/gameObjects/userInterface/Notes/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ class Note extends FNFSprite
*/
final quantArray:Array<Int> = [4, 8, 12, 16, 20, 24, 32, 48, 64, 192]; // different quants

final beatTimeSeconds:Float = (60 / Conductor.bpm); // beat in seconds
var curBPM:Float = Conductor.bpm;
for (i in 0...Conductor.bpmChangeMap.length) {
if (strumTime > Conductor.bpmChangeMap[i].songTime)
curBPM = Conductor.bpmChangeMap[i].bpm;
}

final beatTimeSeconds:Float = (60 / curBPM); // beat in seconds
final beatTime:Float = beatTimeSeconds * 1000; // beat in milliseconds
// assumed 4 beats per measure?
final measureTime:Float = beatTime * 4;
Expand Down
3 changes: 1 addition & 2 deletions source/meta/data/ChartLoader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class ChartLoader
// load fnf style charts (PRE 2.8)
var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped

for (section in noteData)
{
for (section in noteData) {
var coolSection:Int = Std.int(section.lengthInSteps / 4);

for (songNotes in section.sectionNotes)
Expand Down

0 comments on commit 0e0b89e

Please sign in to comment.