1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-27 01:03:35 +00:00

sus cliprect frameWidth / Height

This commit is contained in:
MtH 2021-04-15 04:24:32 +02:00
parent 86e1aed2fa
commit 76dbe40e11

View file

@ -2138,16 +2138,16 @@ class PlayState extends MusicBeatState
if (daNote.animation.curAnim.name.endsWith("end") && daNote.prevNote != null) if (daNote.animation.curAnim.name.endsWith("end") && daNote.prevNote != null)
daNote.y += daNote.prevNote.height; daNote.y += daNote.prevNote.height;
else else
daNote.y += daNote.height / daNote.scale.y; daNote.y += daNote.height / 2;
if ((!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit))) if ((!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit)))
&& daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= strumLineMid) && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= strumLineMid)
{ {
// div by scale because cliprect is affected by scale i THINK // clipRect is applied to graphic itself so use frame Heights
var swagRect:FlxRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y); var swagRect:FlxRect = new FlxRect(0, 0, daNote.frameWidth, daNote.frameHeight);
swagRect.height = (strumLineMid - daNote.y) / daNote.scale.y; swagRect.height = (strumLineMid - daNote.y) / daNote.scale.y;
swagRect.y = daNote.height / daNote.scale.y - swagRect.height; swagRect.y = daNote.frameHeight - swagRect.height;
daNote.clipRect = swagRect; daNote.clipRect = swagRect;
} }
} }