fixed the last sustain being offset

This commit is contained in:
Yoshman29
2022-12-04 20:41:51 +01:00
parent 3e76a27e40
commit 8628ab4bf5
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
1377
1380
+7
View File
@@ -149,6 +149,9 @@ class Note extends FlxSprite
} else {
animation.play("scroll");
}
if (PlayState.instance != null)
PlayState.instance.scripts.event("onPostNoteCreation", event);
}
public var lastScrollSpeed:Null<Float> = null;
@@ -159,6 +162,8 @@ class Note extends FlxSprite
@:privateAccess if (__strumCameras != null) FlxCamera._defaultCameras = __strumCameras;
var negativeScroll = isSustainNote && nextSustain != null && lastScrollSpeed < 0;
if (antialiasing && nextSustain == null)
rotOffset.y += 2;
if (negativeScroll) offset.y *= -1;
if (angleOffsets && Std.int(angle % 360) != 0) {
@@ -203,6 +208,8 @@ class Note extends FlxSprite
}
super.draw();
if (negativeScroll) offset.y *= -1;
if (antialiasing && nextSustain == null)
rotOffset.y -= 2;
@:privateAccess FlxCamera._defaultCameras = oldDefaultCameras;
}