From 1dc1742fa048f47a8991b5ed964526c34df3619a Mon Sep 17 00:00:00 2001 From: holly Date: Fri, 3 Sep 2021 21:26:49 +0100 Subject: [PATCH] we already know that everyone doesn't have the... same score so we can stop iterating. --- server/MultiplayerExtras/OsuBattleRoyale.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/MultiplayerExtras/OsuBattleRoyale.js b/server/MultiplayerExtras/OsuBattleRoyale.js index 100f643..9fc35b4 100644 --- a/server/MultiplayerExtras/OsuBattleRoyale.js +++ b/server/MultiplayerExtras/OsuBattleRoyale.js @@ -17,7 +17,10 @@ module.exports = class { let everyoneHasTheSameScore = true; for (let i = 0; i < playerScores.length; i++) { - if (playerScores[i].score != lowestScore) everyoneHasTheSameScore = false; + if (playerScores[i].score != lowestScore) { + everyoneHasTheSameScore = false; + break; + } } // Everyone has the same score, we don't need to kick anyone