a lot of little fixes and alt animation per notes
This commit is contained in:
@ -423,23 +423,16 @@ class PlayState extends MusicBeatState
|
||||
|
||||
TimingStruct.clearTimings();
|
||||
|
||||
var convertedStuff:Array<Song.Event> = [];
|
||||
|
||||
var currentIndex = 0;
|
||||
for (i in SONG.eventObjects)
|
||||
{
|
||||
var name = Reflect.field(i,"name");
|
||||
var type = Reflect.field(i,"type");
|
||||
var pos = Reflect.field(i,"position");
|
||||
var value = Reflect.field(i,"value");
|
||||
|
||||
if (type == "BPM Change")
|
||||
if (i.type == "BPM Change")
|
||||
{
|
||||
var beat:Float = pos;
|
||||
var beat:Float = i.position;
|
||||
|
||||
var endBeat:Float = Math.POSITIVE_INFINITY;
|
||||
|
||||
TimingStruct.addTiming(beat,value,endBeat, 0); // offset in this case = start time since we don't have a offset
|
||||
TimingStruct.addTiming(beat,i.value,endBeat, 0); // offset in this case = start time since we don't have a offset
|
||||
|
||||
if (currentIndex != 0)
|
||||
{
|
||||
@ -451,39 +444,8 @@ class PlayState extends MusicBeatState
|
||||
|
||||
currentIndex++;
|
||||
}
|
||||
convertedStuff.push(new Song.Event(name,pos,value,type));
|
||||
}
|
||||
|
||||
SONG.eventObjects = convertedStuff;
|
||||
|
||||
var ba = SONG.bpm;
|
||||
|
||||
var index = 0;
|
||||
|
||||
trace("conversion stuff " + SONG.song + " " + SONG.notes.length);
|
||||
|
||||
for(i in SONG.notes)
|
||||
{
|
||||
var currentBeat = 4 * index;
|
||||
|
||||
var currentSeg = TimingStruct.getTimingAtBeat(currentBeat);
|
||||
|
||||
if (currentSeg == null)
|
||||
continue;
|
||||
|
||||
var beat:Float = currentSeg.startBeat + (currentBeat - currentSeg.startBeat);
|
||||
|
||||
if (i.changeBPM && i.bpm != ba)
|
||||
{
|
||||
trace("converting changebpm for section " + index);
|
||||
ba = i.bpm;
|
||||
SONG.eventObjects.push(new Song.Event("FNF BPM Change " + index,beat,i.bpm,"BPM Change"));
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
|
||||
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + PlayStateChangeables.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: '
|
||||
+ Conductor.timeScale + '\nBotPlay : ' + PlayStateChangeables.botPlay);
|
||||
|
||||
@ -1939,6 +1901,8 @@ class PlayState extends MusicBeatState
|
||||
susLength = susLength / Conductor.stepCrochet;
|
||||
unspawnNotes.push(swagNote);
|
||||
|
||||
swagNote.isAlt = songNotes[3];
|
||||
|
||||
if (susLength > 0)
|
||||
swagNote.isParent = true;
|
||||
|
||||
@ -1951,6 +1915,7 @@ class PlayState extends MusicBeatState
|
||||
var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true);
|
||||
sustainNote.scrollFactor.set();
|
||||
unspawnNotes.push(sustainNote);
|
||||
sustainNote.isAlt = songNotes[3];
|
||||
|
||||
sustainNote.mustPress = gottaHitNote;
|
||||
|
||||
@ -3080,6 +3045,12 @@ class PlayState extends MusicBeatState
|
||||
altAnim = '-alt';
|
||||
}
|
||||
|
||||
if (daNote.isAlt)
|
||||
{
|
||||
altAnim = '-alt';
|
||||
trace("YOO WTF THIS IS AN ALT NOTE????");
|
||||
}
|
||||
|
||||
// Accessing the animation name directly to play it
|
||||
if (!daNote.isParent && daNote.parent != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user