Merge pull request #295 from nickdnk/master

Fix wrong filter for "Max Players" for CSGO
This commit is contained in:
Michael Morrison 2022-07-19 17:02:20 -05:00 committed by GitHub
commit aa97a26a62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,8 @@ const AppId = {
Bat1944: 489940, Bat1944: 489940,
Ship: 2400, Ship: 2400,
DayZ: 221100, DayZ: 221100,
Rust: 252490 Rust: 252490,
CSGO: 730
}; };
class Valve extends Core { class Valve extends Core {
@ -226,7 +227,7 @@ class Valve extends Core {
if(!name) continue; if(!name) continue;
// CSGO sometimes adds a bot named 'Max Players' if host_players_show is not 2 // CSGO sometimes adds a bot named 'Max Players' if host_players_show is not 2
if (state.raw.steamappid === 730 && name === 'Max Players') continue; if (state.raw.appId === AppId.CSGO && name === 'Max Players') continue;
state.raw.players.push({ state.raw.players.push({
name:name, score:score, time:time name:name, score:score, time:time