From 2d48435b3b1c5be744e2926de2d2e3259aaffe9c Mon Sep 17 00:00:00 2001 From: MtH Date: Wed, 31 Mar 2021 19:11:05 +0200 Subject: [PATCH] downscroll susnotes positioning --- source/PlayState.hx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index b3476641f..fe23faac8 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1620,7 +1620,7 @@ class PlayState extends MusicBeatState } } - while (unspawnNotes[0] != null &&unspawnNotes[0].strumTime - Conductor.songPosition < 1500 / SONG.speed) + while (unspawnNotes[0] != null && unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SONG.speed) { var dunceNote:Note = unspawnNotes[0]; notes.add(dunceNote); @@ -1650,16 +1650,23 @@ class PlayState extends MusicBeatState { daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); - if (daNote.isSustainNote - && (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))) - && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= strumLineMid) + if (daNote.isSustainNote) { - // div by scale because cliprect is affected by scale i THINK - var swagRect:FlxRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y); + if (daNote.animation.curAnim.name.endsWith("end") && daNote.prevNote != null) + daNote.y += daNote.prevNote.height; + else + daNote.y += daNote.height / daNote.scale.y; - swagRect.height = (strumLineMid - daNote.y) / daNote.scale.y; - swagRect.y = daNote.height / daNote.scale.y - swagRect.height; - daNote.clipRect = swagRect; + if ((!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))) + && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= strumLineMid) + { + // div by scale because cliprect is affected by scale i THINK + var swagRect:FlxRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y); + + swagRect.height = (strumLineMid - daNote.y) / daNote.scale.y; + swagRect.y = daNote.height / daNote.scale.y - swagRect.height; + daNote.clipRect = swagRect; + } } } else