This commit is contained in:
Yoshman29
2023-02-21 01:29:28 +01:00
parent 18823ab677
commit 0ae79a9bb4
3 changed files with 18 additions and 14 deletions
+6 -12
View File
@@ -72,7 +72,6 @@ class Note extends FlxSprite
}
public var sustainLength:Float = 0;
public var stepLength:Float = 0;
public var isSustainNote:Bool = false;
public var flipSustain:Bool = true;
@@ -173,16 +172,6 @@ class Note extends FlxSprite
if (PlayState.instance != null)
PlayState.instance.scripts.event("onPostNoteCreation", event);
if (!isSustainNote && noteData.sustainLength > Conductor.stepCrochet * 0.75) {
var len:Float = noteData.sustainLength;
var curLen:Float = 0;
while(len > 10) {
curLen = Math.min(len, Conductor.stepCrochet);
len -= curLen;
strumLine.notes.add(new Note(strumLine, noteData, true, curLen, noteData.sustainLength - len));
}
}
}
public var lastScrollSpeed:Null<Float> = null;
@@ -195,6 +184,11 @@ class Note extends FlxSprite
*/
public var strumRelativePos:Bool = true;
override function drawComplex(camera:FlxCamera) {
flipY = flipSustain && ((camera is HudCamera ? cast(camera, HudCamera).downscroll : false) != (__strum != null && __strum.getScrollSpeed(this) < 0));
super.drawComplex(camera);
}
override function draw() {
@:privateAccess var oldDefaultCameras = FlxCamera._defaultCameras;
@:privateAccess if (__strumCameras != null) FlxCamera._defaultCameras = __strumCameras;
@@ -244,7 +238,7 @@ class Note extends FlxSprite
// is long sustain
lastScrollSpeed = scrollSpeed;
scale.y = (stepLength * (0.45 * FlxMath.roundDecimal(scrollSpeed, 2))) / frameHeight;
scale.y = (sustainLength * (0.45 * FlxMath.roundDecimal(scrollSpeed, 2))) / frameHeight;
updateHitbox();
if (useAntialiasingFix) {
// dumbass antialiasing