chore: Remove the behaviour of adding empty player instances on epic if N mismatch

This commit is contained in:
CosminPerRam 2023-11-13 00:05:18 +02:00
parent 98da8d555f
commit a36f84309a

View file

@ -79,18 +79,11 @@ class Epic extends Core {
state.numplayers = desiredServer.totalPlayers
state.maxplayers = desiredServer.settings.maxPublicPlayers
// If the game returns the player list, we can use it otherwise we use the total players.
if (desiredServer.totalPlayers === desiredServer.publicPlayers.length) {
for (const player of desiredServer.publicPlayers) {
state.players.push({
name: player.name,
raw: player
})
}
} else {
for (let i = 0; i < desiredServer.totalPlayers; i++) {
state.players.push('')
}
for (const player of desiredServer.publicPlayers) {
state.players.push({
name: player.name,
raw: player
})
}
state.raw = desiredServer