From 539a5f855054ca6f4fec16024c62f21208353af7 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 21 Oct 2020 13:12:32 -0700 Subject: [PATCH] made sustain notes slightly nicer --- source/ChartingState.hx | 5 +++-- source/PlayState.hx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 92cc345..7dcfca6 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -555,8 +555,9 @@ class ChartingState extends MusicBeatState if (daSus > 0) { - var sustainVis:FlxSprite = new FlxSprite(note.x, - note.y).makeGraphic(8, Math.floor(FlxMath.remapToRange(daSus, 0, Conductor.stepCrochet * 16, 0, gridBG.height))); + var sustainVis:FlxSprite = new FlxSprite(note.x + (GRID_SIZE / 2), + note.y + getYfromStrum(note.strumTime + Conductor.stepCrochet)).makeGraphic(8, + Math.floor(FlxMath.remapToRange(daSus, 0, Conductor.stepCrochet * 16, 0, gridBG.height))); curRenderedSustains.add(sustainVis); } } diff --git a/source/PlayState.hx b/source/PlayState.hx index 3ccb642..25fc713 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -303,7 +303,7 @@ class PlayState extends MusicBeatState { oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)]; - var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote), daNoteData, oldNote, true); + var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true); sustainNote.scrollFactor.set(); unspawnNotes.push(sustainNote);