Fix holds
This commit is contained in:
@@ -101,13 +101,16 @@ class Note extends FlxSprite
|
||||
return __customNoteTypeExists[path];
|
||||
return __customNoteTypeExists[path] = Assets.exists(path);
|
||||
}
|
||||
public function new(strumLine:StrumLine, noteData:ChartNote, sustain:Bool = false, sustainLength:Float = 0, sustainOffset:Float = 0)
|
||||
public function new(strumLine:StrumLine, noteData:ChartNote, sustain:Bool = false, sustainLength:Float = 0, sustainOffset:Float = 0, ?prev:Note)
|
||||
{
|
||||
super();
|
||||
|
||||
moves = false;
|
||||
|
||||
this.prevNote = strumLine.notes.members.last();
|
||||
if(prev != null)
|
||||
this.prevNote = prev;
|
||||
else
|
||||
this.prevNote = strumLine.notes.members.last();
|
||||
this.noteTypeID = noteData.type.getDefault(0);
|
||||
this.isSustainNote = sustain;
|
||||
this.sustainLength = sustainLength;
|
||||
|
||||
@@ -116,22 +116,23 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
}
|
||||
|
||||
notes.preallocate(total);
|
||||
notes.length = total;
|
||||
|
||||
var il = 0;
|
||||
|
||||
var prev:Note = null;
|
||||
|
||||
if (strumLine.notes != null) for(note in strumLine.notes) {
|
||||
if (startTime != null && startTime > note.time)
|
||||
continue;
|
||||
|
||||
notes.members[total-(il++)-1] = new Note(this, note, false);
|
||||
notes.members[total-(il++)-1] = prev = new Note(this, note, false, prev);
|
||||
|
||||
if (note.sLen > Conductor.stepCrochet * 0.75) {
|
||||
var len:Float = note.sLen;
|
||||
var curLen:Float = 0;
|
||||
while(len > 10) {
|
||||
curLen = Math.min(len, Conductor.stepCrochet);
|
||||
notes.members[total-(il++)-1] = new Note(this, note, true, curLen, note.sLen - len);
|
||||
notes.members[total-(il++)-1] = prev = new Note(this, note, true, curLen, note.sLen - len, prev);
|
||||
len -= curLen;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user