send playerCount in payload directly instead of nesting into legacy data structure

This commit is contained in:
Nick Krecklow
2020-05-08 16:13:24 -05:00
parent 04d94a9461
commit 320dc3c2fb
4 changed files with 8 additions and 14 deletions

View File

@ -101,7 +101,7 @@ export class SocketManager {
// Skip any incoming updates if the graph is disabled
if (serverUpdate.updateHistoryGraph && this._app.graphDisplayManager.isVisible) {
// Update may not be successful, safely append 0 points
const playerCount = serverUpdate.result ? serverUpdate.result.players.online : 0
const playerCount = serverUpdate.playerCount || 0
this._app.graphDisplayManager.addGraphPoint(serverRegistration.serverId, payload.timestamp, playerCount)