Skip to content

Commit 93c6542

Browse files
committed
nvm this is more performant
why did i have to separate it
1 parent 3d2cbc4 commit 93c6542

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

source/funkin/game/PlayState.hx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,15 +1235,11 @@ class PlayState extends MusicBeatState
12351235
accFormat.format.color = curRating.color;
12361236
accuracyTxt.text = 'Accuracy:${accuracy < 0 ? "-%" : '${CoolUtil.quantize(accuracy * 100, 100)}%'} - ${curRating.rating}';
12371237

1238-
var formatIndex:Int = -1;
12391238
for (i => frmtRange in accuracyTxt._formatRanges) if (frmtRange.format == accFormat) {
1240-
formatIndex = i;
1239+
accuracyTxt._formatRanges[i].range.start = accuracyTxt.text.length - curRating.rating.length;
1240+
accuracyTxt._formatRanges[i].range.end = accuracyTxt.text.length;
12411241
break;
12421242
}
1243-
if (formatIndex > -1) {
1244-
accuracyTxt._formatRanges[formatIndex].range.start = accuracyTxt.text.length - curRating.rating.length;
1245-
accuracyTxt._formatRanges[formatIndex].range.end = accuracyTxt.text.length;
1246-
}
12471243
}
12481244
}
12491245

0 commit comments

Comments
 (0)