diff --git a/source/game/Note.hx b/source/game/Note.hx index 6a79626e09..564ff72baf 100644 --- a/source/game/Note.hx +++ b/source/game/Note.hx @@ -67,7 +67,7 @@ class Note extends FlxSkewedSprite { public var song:SongData; - public var speed:Float = 1; + public var speed(default, set):Float = 1; #if MODCHARTING_TOOLS /** @@ -334,6 +334,18 @@ class Note extends FlxSkewedSprite { frame = frames.frames[animation.frameIndex]; return rect; } + + @:noCompletion function set_speed(speed:Float):Float { + if(isSustainNote && !inEditor && animation != null && !animation?.curAnim?.name?.endsWith('end')){ + scale.y = Std.parseFloat(PlayState.instance.ui_settings[0]) * (Std.parseFloat(PlayState.instance.ui_settings[2]) + - (Std.parseFloat(PlayState.instance.mania_size[3]))); + scale.y *= Conductor.stepCrochet / 100 * 1.5 * speed; + updateHitbox(); + centerOffsets(); + centerOrigin(); + } + return this.speed = speed; + } } typedef NoteType = { diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index b16c3c581c..75a0c918e9 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -1669,7 +1669,6 @@ class PlayState extends MusicBeatState { var swagNote:Note = new Note(daStrumTime, noteData, oldNote, false, char, songNotes[4], null, chars, gottaHitNote); swagNote.sustainLength = songNotes[2]; - swagNote.scrollFactor.set(0, 0); unspawnNotes.push(swagNote);