From c0c01e361460782a12c9f725e964d672e0fb1300 Mon Sep 17 00:00:00 2001 From: Vortex <73261680+Vortex2Oblivion@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:56:53 +0000 Subject: [PATCH] Stop nesting this if statement --- source/states/PlayState.hx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index f7891cb847..f01edb1b13 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -1109,8 +1109,7 @@ class PlayState extends MusicBeatState { if (Options.getData('colorQuantization')) { var col:Array = [142, 142, 142]; for (note in unspawnNotes) { - if (note.affectedbycolor) { - if (!note.isSustainNote) { + if (!note.isSustainNote && note.affectedbycolor) { var quantStrumTime:Float = note.strumTime; var currentStepCrochet:Float = Conductor.stepCrochet; var noteBeat:Int = Math.floor(((quantStrumTime / (currentStepCrochet * 4)) * 48) + 0.5); @@ -1129,7 +1128,6 @@ class PlayState extends MusicBeatState { sustain.colorSwap.g = note.colorSwap.g; sustain.colorSwap.b = note.colorSwap.b; } - } } } }