mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Fix random bot appearing in csgo
This commit is contained in:
parent
37bd2d0fe8
commit
a9d0c38b70
2 changed files with 7 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ contactjack|Contact J.A.C.K.|gamespy1|port_query=27888
|
||||||
cs16|Counter-Strike 1.6|valve
|
cs16|Counter-Strike 1.6|valve
|
||||||
cscz|Counter-Strike: Condition Zero|valve
|
cscz|Counter-Strike: Condition Zero|valve
|
||||||
css|Counter-Strike: Source|valve
|
css|Counter-Strike: Source|valve
|
||||||
csgo|Counter-Strike: Global Offensive|valve
|
csgo|Counter-Strike: Global Offensive|valve||isCsGo
|
||||||
|
|
||||||
crossracing|Cross Racing Championship|ase|port=12321,port_query_offset=123
|
crossracing|Cross Racing Championship|ase|port=12321,port_query_offset=123
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@ module.exports = require('./core').extend({
|
||||||
// at all, use the old dedicated challenge query if needed
|
// at all, use the old dedicated challenge query if needed
|
||||||
this.legacyChallenge = false;
|
this.legacyChallenge = false;
|
||||||
|
|
||||||
|
// cs:go provides an annoying additional bot that looks exactly like a player,
|
||||||
|
// but is always named "Max Players"
|
||||||
|
this.isCsGo = false;
|
||||||
|
|
||||||
// 2006 engines don't pass packet switching size in split packet header
|
// 2006 engines don't pass packet switching size in split packet header
|
||||||
// while all others do, this need is detected automatically
|
// while all others do, this need is detected automatically
|
||||||
this._skipSizeInSplitHeader = false;
|
this._skipSizeInSplitHeader = false;
|
||||||
|
|
@ -149,6 +153,8 @@ module.exports = require('./core').extend({
|
||||||
|
|
||||||
// connecting players don't count as players.
|
// connecting players don't count as players.
|
||||||
if(!name) continue;
|
if(!name) continue;
|
||||||
|
|
||||||
|
if(self.isCsGo && name === 'Max Players') continue;
|
||||||
|
|
||||||
(time == -1 ? state.bots : state.players).push({
|
(time == -1 ? state.bots : state.players).push({
|
||||||
name:name, score:score, time:time
|
name:name, score:score, time:time
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue