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:
James Causon 2025-01-04 21:03:49 +00:00 committed by GitHub
parent d834c8091d
commit 0ad23aa1a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

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