mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
fix: Use cp tag for accurate rust player count (#663)
* Use cp tag for accurate rust playercount * Add changelog entry
This commit is contained in:
parent
d834c8091d
commit
0ad23aa1a4
2 changed files with 7 additions and 0 deletions
|
|
@ -141,6 +141,12 @@ export default class valve extends Core {
|
|||
state.maxplayers = value
|
||||
}
|
||||
}
|
||||
if (tag.startsWith('cp')) {
|
||||
const value = parseInt(tag.replace('cp', ''))
|
||||
if (!isNaN(value)) {
|
||||
state.numplayers = value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue