Skip to content

Commit

Permalink
Stop nesting this if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion authored Sep 24, 2024
1 parent c9cd298 commit c0c01e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,7 @@ class PlayState extends MusicBeatState {
if (Options.getData('colorQuantization')) {
var col:Array<Int> = [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);
Expand All @@ -1129,7 +1128,6 @@ class PlayState extends MusicBeatState {
sustain.colorSwap.g = note.colorSwap.g;
sustain.colorSwap.b = note.colorSwap.b;
}
}
}
}
}
Expand Down

0 comments on commit c0c01e3

Please sign in to comment.