sus
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
2322
|
||||
2328
|
||||
@@ -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
|
||||
|
||||
@@ -64,6 +64,16 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
public function generate(strumLine:ChartStrumLine) {
|
||||
if (strumLine.notes != null) for(note in strumLine.notes) {
|
||||
notes.add(new Note(this, note, false));
|
||||
|
||||
if (note.sustainLength > Conductor.stepCrochet * 0.75) {
|
||||
var len:Float = note.sustainLength;
|
||||
var curLen:Float = 0;
|
||||
while(len > 10) {
|
||||
curLen = Math.min(len, Conductor.stepCrochet);
|
||||
notes.add(new Note(this, note, true, curLen, note.sustainLength - len));
|
||||
len -= curLen;
|
||||
}
|
||||
}
|
||||
}
|
||||
notes.sortNotes();
|
||||
}
|
||||
@@ -105,7 +115,7 @@ class StrumLine extends FlxTypedGroup<Strum> {
|
||||
|
||||
if (PlayState.instance.__updateNote_event.__autoCPUHit && cpu && !daNote.wasGoodHit && daNote.strumTime < Conductor.songPosition) PlayState.instance.goodNoteHit(this, daNote);
|
||||
|
||||
if (daNote.wasGoodHit && daNote.isSustainNote && daNote.strumTime + (daNote.stepLength) < Conductor.songPosition) {
|
||||
if (daNote.wasGoodHit && daNote.isSustainNote && daNote.strumTime + (daNote.sustainLength) < Conductor.songPosition) {
|
||||
deleteNote(daNote);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user