From 44838a9629bcc4db8964346cea12c8a4f55fb3d9 Mon Sep 17 00:00:00 2001 From: Ethan Stubbs <37120476+tgpethan@users.noreply.github.com> Date: Fri, 5 Feb 2021 03:15:39 +0000 Subject: [PATCH] TourneyMatchSpecialInfo code quality --- server/Packets/TourneyMatchSpecialInfo.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/Packets/TourneyMatchSpecialInfo.js b/server/Packets/TourneyMatchSpecialInfo.js index 922fdaf..80013b5 100644 --- a/server/Packets/TourneyMatchSpecialInfo.js +++ b/server/Packets/TourneyMatchSpecialInfo.js @@ -1,7 +1,7 @@ const osu = require("osu-packet"), + UserPresence = require("./UserPresence.js"), + StatusUpdate = require("./StatusUpdate.js"), ActionBuffer = require("../ActionBuffer.js"); -const UserPresence = require("./UserPresence.js"), - StatusUpdate = require("./StatusUpdate.js"); module.exports = function(CurrentUser, MatchID) { const matchData = global.MultiplayerManager.getMatchInfoForTourneyClient(MatchID); @@ -13,8 +13,7 @@ module.exports = function(CurrentUser, MatchID) { let actions = new ActionBuffer(osuPacketWriter.toBuffer); - for (let i = 0; i < matchData.slots.length; i++) { - const slot = matchData.slots[i]; + for (let slot in matchData.slots) { actions.bufferAction(UserPresence(CurrentUser, slot.playerId, false)); actions.bufferAction(StatusUpdate(CurrentUser, slot.playerId, false)); }