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)); }