optimization to note rendering and sm fixes
This commit is contained in:
parent
33d1eafb42
commit
2ea025fcc9
@ -1051,6 +1051,23 @@ class PlayState extends MusicBeatState
|
||||
|
||||
generateSong(SONG.song);
|
||||
|
||||
for(i in unspawnNotes)
|
||||
{
|
||||
var dunceNote:Note = i;
|
||||
notes.add(dunceNote);
|
||||
if (executeModchart)
|
||||
{
|
||||
if (!dunceNote.isSustainNote)
|
||||
dunceNote.cameras = [camNotes];
|
||||
else
|
||||
dunceNote.cameras = [camSustains];
|
||||
}
|
||||
else
|
||||
{
|
||||
dunceNote.cameras = [camHUD];
|
||||
}
|
||||
}
|
||||
|
||||
trace('generated');
|
||||
|
||||
// add(strumLine);
|
||||
@ -2195,7 +2212,23 @@ class PlayState extends MusicBeatState
|
||||
perfectMode = false;
|
||||
#end
|
||||
|
||||
|
||||
if (generatedMusic)
|
||||
{
|
||||
for(i in notes)
|
||||
{
|
||||
var diff = i.strumTime - Conductor.songPosition;
|
||||
if (diff < 8000 && diff >= -8000)
|
||||
{
|
||||
i.active = true;
|
||||
i.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
i.active = false;
|
||||
i.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (updateFrame == 4)
|
||||
{
|
||||
@ -2517,13 +2550,6 @@ class PlayState extends MusicBeatState
|
||||
daNote.destroy();
|
||||
}
|
||||
});
|
||||
for (i in 0...unspawnNotes.length) {
|
||||
var daNote:Note = unspawnNotes[0];
|
||||
if(daNote.strumTime - 500 >= Conductor.songPosition) {
|
||||
break;
|
||||
}
|
||||
unspawnNotes.splice(unspawnNotes.indexOf(daNote), 1);
|
||||
}
|
||||
|
||||
FlxG.sound.music.time = Conductor.songPosition;
|
||||
FlxG.sound.music.play();
|
||||
@ -2899,27 +2925,6 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
if (unspawnNotes[0] != null)
|
||||
{
|
||||
if (unspawnNotes[0].strumTime - Conductor.songPosition < 3500)
|
||||
{
|
||||
var dunceNote:Note = unspawnNotes[0];
|
||||
notes.add(dunceNote);
|
||||
if (executeModchart)
|
||||
{
|
||||
if (!dunceNote.isSustainNote)
|
||||
dunceNote.cameras = [camNotes];
|
||||
else
|
||||
dunceNote.cameras = [camSustains];
|
||||
}
|
||||
else
|
||||
{
|
||||
dunceNote.cameras = [camHUD];
|
||||
}
|
||||
var index:Int = unspawnNotes.indexOf(dunceNote);
|
||||
unspawnNotes.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (generatedMusic)
|
||||
{
|
||||
|
@ -201,6 +201,8 @@ class SMFile
|
||||
changeBPM: false,
|
||||
altAnim: false
|
||||
};
|
||||
if (!isDouble)
|
||||
section.mustHitSection = true;
|
||||
}
|
||||
|
||||
var seg = TimingStruct.getTimingAtBeat(currentBeat);
|
||||
@ -283,7 +285,7 @@ class SMFile
|
||||
song.eventObjects = header.changeEvents;
|
||||
}
|
||||
|
||||
var newSections = [];
|
||||
/*var newSections = [];
|
||||
|
||||
for(s in 0...song.notes.length) // lets go ahead and make sure each note is actually in their own section haha
|
||||
{
|
||||
@ -307,10 +309,11 @@ class SMFile
|
||||
}
|
||||
}
|
||||
newSections.push(sec);
|
||||
}
|
||||
}*/
|
||||
// WE ALREADY DO THIS
|
||||
|
||||
|
||||
song.notes = newSections;
|
||||
//song.notes = newSections;
|
||||
|
||||
// save da song
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user