fix: epic protocol numplayers not being in the raw field (#427)

This commit is contained in:
CosminPerRam 2023-12-03 03:25:54 +02:00 committed by GitHub
parent 6d491897a2
commit 266db8c6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@
### 4.3.0 ### 4.3.0
* Fix `Post Scriptum` not being on the valve protocol. * Fix `Post Scriptum` not being on the valve protocol.
* Fix `Epic` protocol's `numplayers` not being in the `raw` field.
### 4.2.0 ### 4.2.0
* Renamed `Counter Strike: 2D` to `CS2D` in [games.txt](games.txt) (why? see [this](https://cs2d.com/faq.php?show=misc_name#misc_name)). * Renamed `Counter Strike: 2D` to `CS2D` in [games.txt](games.txt) (why? see [this](https://cs2d.com/faq.php?show=misc_name#misc_name)).

View File

@ -76,7 +76,6 @@ class Epic extends Core {
state.name = desiredServer.attributes.CUSTOMSERVERNAME_s state.name = desiredServer.attributes.CUSTOMSERVERNAME_s
state.map = desiredServer.attributes.MAPNAME_s state.map = desiredServer.attributes.MAPNAME_s
state.password = desiredServer.attributes.SERVERPASSWORD_b state.password = desiredServer.attributes.SERVERPASSWORD_b
state.numplayers = desiredServer.totalPlayers
state.maxplayers = desiredServer.settings.maxPublicPlayers state.maxplayers = desiredServer.settings.maxPublicPlayers
for (const player of desiredServer.publicPlayers) { for (const player of desiredServer.publicPlayers) {
@ -87,6 +86,7 @@ class Epic extends Core {
} }
state.raw = desiredServer state.raw = desiredServer
state.raw.numplayers = desiredServer.totalPlayers
} }
async cleanup (state) { async cleanup (state) {