Skip to content

Commit

Permalink
feat: quake2 protocol's version field, look for 'version' in the raw …
Browse files Browse the repository at this point in the history
…object

Observed while looking on #619
  • Loading branch information
CosminPerRam committed Aug 30, 2024
1 parent 2cfb2c8 commit cb73ccd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions protocols/quake2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cb73ccd

Please sign in to comment.