some fixes
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
938
|
||||
939
|
||||
@@ -45,6 +45,7 @@ class Note extends FlxSprite
|
||||
}
|
||||
|
||||
public var sustainLength:Float = 0;
|
||||
public var stepLength:Float = 0;
|
||||
public var isSustainNote:Bool = false;
|
||||
|
||||
public var noteTypeID:Int = 0;
|
||||
@@ -199,7 +200,7 @@ class Note extends FlxSprite
|
||||
// is long sustain
|
||||
lastScrollSpeed = scrollSpeed;
|
||||
|
||||
scale.y = Conductor.stepCrochet / 100 * 1.5 * scrollSpeed * 0.7;
|
||||
scale.y = stepLength / 100 * 1.5 * scrollSpeed * 0.7;
|
||||
updateHitbox();
|
||||
}
|
||||
|
||||
|
||||
@@ -442,12 +442,14 @@ class PlayState extends MusicBeatState
|
||||
var noteData:Array<SwagSection> = songData.notes;
|
||||
var playerCounter:Int = 0;
|
||||
var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped
|
||||
var stepCrochet = Conductor.stepCrochet;
|
||||
|
||||
for (section in noteData)
|
||||
{
|
||||
if (section == null || section.sectionNotes == null) continue;
|
||||
|
||||
// var coolSection:Int = Std.int(section.lengthInSteps / 4);
|
||||
if (section.changeBPM && section.bpm > 0)
|
||||
stepCrochet = ((60 / section.bpm) * 250);
|
||||
|
||||
for (songNotes in section.sectionNotes)
|
||||
{
|
||||
@@ -473,17 +475,19 @@ class PlayState extends MusicBeatState
|
||||
swagNote.nextNote = (swagNote = new Note(daStrumTime, daNoteData % 4, daNoteType, gottaHitNote, swagNote));
|
||||
swagNote.sustainLength = songNotes[2];
|
||||
swagNote.scrollFactor.set(0, 0);
|
||||
swagNote.stepLength = stepCrochet;
|
||||
notes.add(swagNote);
|
||||
|
||||
// calculate sustain length and fix
|
||||
var susLength:Float = swagNote.sustainLength / Conductor.stepCrochet;
|
||||
var susLength:Float = swagNote.sustainLength / stepCrochet;
|
||||
if (susLength > 0.75) susLength++;
|
||||
|
||||
// create sustains
|
||||
for (susNote in 0...Math.floor(susLength))
|
||||
{
|
||||
swagNote = new Note(daStrumTime + (Conductor.stepCrochet * susNote), daNoteData % 4, daNoteType, gottaHitNote, swagNote, true);
|
||||
swagNote = new Note(daStrumTime + (stepCrochet * susNote), daNoteData % 4, daNoteType, gottaHitNote, swagNote, true);
|
||||
swagNote.scrollFactor.set();
|
||||
swagNote.stepLength = stepCrochet;
|
||||
notes.add(swagNote);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +147,20 @@ class ZipFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
|
||||
}
|
||||
|
||||
public function getFiles(folder:String):Array<String> {
|
||||
// TODO
|
||||
return [];
|
||||
var content:Array<String> = [];
|
||||
|
||||
if (!folder.endsWith("/")) folder = folder + "/";
|
||||
if (!__parseAsset(folder)) return [];
|
||||
|
||||
@:privateAccess
|
||||
for(k=>e in assets) {
|
||||
if (k.toLowerCase().startsWith(_parsedAsset)) {
|
||||
var fileName = k.substr(_parsedAsset.length);
|
||||
if (!fileName.contains("/"))
|
||||
content.push(fileName);
|
||||
}
|
||||
}
|
||||
return content;
|
||||
}
|
||||
#end
|
||||
}
|
||||
Reference in New Issue
Block a user