feat: quake2 protocol's version field, look for 'version' in the raw object

Observed while looking on #619
This commit is contained in:
CosminPerRam 2024-08-31 02:08:59 +03:00
parent 2cfb2c8592
commit cb73ccd260
2 changed files with 2 additions and 0 deletions

View file

@ -2,6 +2,7 @@
## To Be Released...
## 5.X.Y
* 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
* Added Vintage Story support via the master server (#606)

View file

@ -83,6 +83,7 @@ export default class quake2 extends Core {
if ('sv_hostname' in state.raw) state.name = state.raw.sv_hostname
if ('hostname' in state.raw) state.name = state.raw.hostname
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
else state.numplayers = state.players.length + state.bots.length
}