diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b3dce8..2f585bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/protocols/quake2.js b/protocols/quake2.js index 3de861d5..549b07ae 100644 --- a/protocols/quake2.js +++ b/protocols/quake2.js @@ -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 }