mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
fix(protocol/battlefield): detect BFBC2 Vietnam DLC as BFBC2 (#713)
closes #712
This commit is contained in:
parent
96c8e725d8
commit
bab3452047
2 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
## To Be Released...
|
## To Be Released...
|
||||||
## 5.X.Y
|
## 5.X.Y
|
||||||
|
* Fix: detect BFBC2 Vietnam DLC as BFBC2 (By @cetteup #713)
|
||||||
|
|
||||||
## 5.3.1
|
## 5.3.1
|
||||||
* Fix: HTTP requests would end up making more retries than needed due to got's internal retry mechanism (#690, thanks @RattleSN4K3)
|
* Fix: HTTP requests would end up making more retries than needed due to got's internal retry mechanism (#690, thanks @RattleSN4K3)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ export default class battlefield extends Core {
|
||||||
if (data.length) state.raw.uptime = parseInt(data.shift())
|
if (data.length) state.raw.uptime = parseInt(data.shift())
|
||||||
if (data.length) state.raw.roundtime = parseInt(data.shift())
|
if (data.length) state.raw.roundtime = parseInt(data.shift())
|
||||||
|
|
||||||
const isBadCompany2 = data[0] === 'BC2'
|
// If this is a Bad Company 2 server, the next field will indicate the "gameMod" followed by an unknown field
|
||||||
|
const isBadCompany2 = data[0] === 'BC2' || data[0] === 'VIETNAM'
|
||||||
if (isBadCompany2) {
|
if (isBadCompany2) {
|
||||||
if (data.length) data.shift()
|
if (data.length) data.shift()
|
||||||
if (data.length) data.shift()
|
if (data.length) data.shift()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue