mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: quake2 protocol's version field, look for 'version' in the raw object
Observed while looking on #619
This commit is contained in:
parent
2cfb2c8592
commit
cb73ccd260
2 changed files with 2 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
## To Be Released...
|
## To Be Released...
|
||||||
## 5.X.Y
|
## 5.X.Y
|
||||||
* Fix: `Deus Ex` using the wrong protocol (#621)
|
* Fix: `Deus Ex` using the wrong protocol (#621)
|
||||||
|
* Feat: For the Quake2 protocol `version`'s field, also look for `version` in the raw object
|
||||||
|
|
||||||
## 5.1.2
|
## 5.1.2
|
||||||
* Added Vintage Story support via the master server (#606)
|
* Added Vintage Story support via the master server (#606)
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ export default class quake2 extends Core {
|
||||||
if ('sv_hostname' in state.raw) state.name = state.raw.sv_hostname
|
if ('sv_hostname' in state.raw) state.name = state.raw.sv_hostname
|
||||||
if ('hostname' in state.raw) state.name = state.raw.hostname
|
if ('hostname' in state.raw) state.name = state.raw.hostname
|
||||||
if ('clients' in state.raw) state.numplayers = state.raw.clients
|
if ('clients' in state.raw) state.numplayers = state.raw.clients
|
||||||
|
if ('version' in state.raw) state.version = state.raw.version
|
||||||
if ('iv' in state.raw) state.version = state.raw.iv
|
if ('iv' in state.raw) state.version = state.raw.iv
|
||||||
else state.numplayers = state.players.length + state.bots.length
|
else state.numplayers = state.players.length + state.bots.length
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue