mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-13 07:21:11 +01:00
chore: Remove the behaviour of adding empty player instances on epic if N mismatch
This commit is contained in:
parent
98da8d555f
commit
a36f84309a
1 changed files with 5 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue