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

@ -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
}