better than before

This commit is contained in:
Kade M 2021-06-04 19:07:04 -07:00
parent ae7dcea22b
commit 0384a182e4
2 changed files with 107 additions and 86 deletions

View File

@ -25,6 +25,7 @@ class Note extends FlxSprite
public var prevNote:Note; public var prevNote:Note;
public var modifiedByLua:Bool = false; public var modifiedByLua:Bool = false;
public var sustainLength:Float = 0; public var sustainLength:Float = 0;
public var hit:Bool = false;
public var isSustainNote:Bool = false; public var isSustainNote:Bool = false;
public var noteScore:Float = 1; public var noteScore:Float = 1;
@ -179,6 +180,9 @@ class Note extends FlxSprite
else else
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed; prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox(); prevNote.updateHitbox();
// prevNote.setGraphicSize(); // prevNote.setGraphicSize();
} }
@ -194,7 +198,6 @@ class Note extends FlxSprite
// ass // ass
if (isSustainNote) if (isSustainNote)
{ {
trace('sustain note');
if (strumTime > Conductor.songPosition - (Conductor.safeZoneOffset * 1.5) if (strumTime > Conductor.songPosition - (Conductor.safeZoneOffset * 1.5)
&& strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5)) && strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
canBeHit = true; canBeHit = true;

View File

@ -2211,6 +2211,11 @@ class PlayState extends MusicBeatState
{ {
daNote.y = daNote.prevNote.y - daNote.offset.y * 2; daNote.y = daNote.prevNote.y - daNote.offset.y * 2;
if (daNote.prevNote.hit)
{
daNote.visible = false;
}
if(SONG.noteStyle == 'pixel') if(SONG.noteStyle == 'pixel')
daNote.y += daNote.offset.y * 2; daNote.y += daNote.offset.y * 2;
} }
@ -2245,9 +2250,11 @@ class PlayState extends MusicBeatState
if(daNote.isSustainNote) if(daNote.isSustainNote)
{ {
// Don't look at this goofy ass shit, my hatred for upscroll knows no bounds // Don't look at this goofy ass shit, my hatred for upscroll knows no bounds
daNote.y += daNote.frameHeight + daNote.frameHeight / 2; // I personally love upscroll and I fixed this code - Kade
daNote.y += daNote.frameHeight / 2;
daNote.offset.y = -daNote.frameHeight - 15;
daNote.offset.y = daNote.frameHeight;
if(SONG.noteStyle == 'pixel') if(SONG.noteStyle == 'pixel')
daNote.y += daNote.height / 2; daNote.y += daNote.height / 2;
@ -2258,6 +2265,14 @@ class PlayState extends MusicBeatState
{ {
daNote.y = daNote.prevNote.y + daNote.prevNote.height / 2 + daNote.frameHeight / 6; daNote.y = daNote.prevNote.y + daNote.prevNote.height / 2 + daNote.frameHeight / 6;
daNote.offset.y = -daNote.prevNote.frameHeight + 15;
if (daNote.prevNote.hit)
{
daNote.y -= 30;
daNote.visible = false;
}
if(SONG.noteStyle == 'pixel') if(SONG.noteStyle == 'pixel')
daNote.y += daNote.offset.y / 2; daNote.y += daNote.offset.y / 2;
} }
@ -2284,16 +2299,6 @@ class PlayState extends MusicBeatState
} }
} }
if(daNote.prevNote.wasGoodHit && daNote.animation.curAnim.name.endsWith('holdend'))
{
daNote.active = false;
daNote.visible = false;
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
if (!daNote.mustPress && daNote.wasGoodHit) if (!daNote.mustPress && daNote.wasGoodHit)
{ {
if (SONG.song != 'Tutorial') if (SONG.song != 'Tutorial')
@ -2350,7 +2355,10 @@ class PlayState extends MusicBeatState
daNote.active = false; daNote.active = false;
daNote.hit = true;
daNote.kill(); daNote.kill();
daNote.hit = true;
notes.remove(daNote, true); notes.remove(daNote, true);
daNote.destroy(); daNote.destroy();
} }
@ -2383,6 +2391,14 @@ class PlayState extends MusicBeatState
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed)); // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
if ((daNote.mustPress && daNote.tooLate && !FlxG.save.data.downscroll || daNote.mustPress && daNote.tooLate && FlxG.save.data.downscroll) && daNote.mustPress) if ((daNote.mustPress && daNote.tooLate && !FlxG.save.data.downscroll || daNote.mustPress && daNote.tooLate && FlxG.save.data.downscroll) && daNote.mustPress)
{
if (!daNote.visible)
{
notes.remove(daNote, true);
daNote.kill();
daNote.destroy();
}
else
{ {
if (daNote.isSustainNote && daNote.wasGoodHit) if (daNote.isSustainNote && daNote.wasGoodHit)
{ {
@ -2398,13 +2414,13 @@ class PlayState extends MusicBeatState
noteMiss(daNote.noteData, daNote); noteMiss(daNote.noteData, daNote);
} }
daNote.active = false;
daNote.visible = false; daNote.visible = false;
daNote.hit = true;
daNote.kill(); daNote.kill();
notes.remove(daNote, true); notes.remove(daNote, true);
daNote.destroy(); daNote.destroy();
} }
}
}); });
} }
@ -2926,6 +2942,7 @@ class PlayState extends MusicBeatState
{ {
FlxG.log.add("killing dumb ass note at " + note.strumTime); FlxG.log.add("killing dumb ass note at " + note.strumTime);
note.kill(); note.kill();
note.hit = true;
notes.remove(note, true); notes.remove(note, true);
note.destroy(); note.destroy();
} }
@ -3241,6 +3258,7 @@ class PlayState extends MusicBeatState
vocals.volume = 1; vocals.volume = 1;
note.kill(); note.kill();
note.hit = true;
notes.remove(note, true); notes.remove(note, true);
note.destroy(); note.destroy();