#85 Fallback to limited player details if csgo doesn't respond with player packet
This commit is contained in:
parent
49829ddc8c
commit
69614c606c
|
@ -187,6 +187,18 @@ class Valve extends require('./core') {
|
||||||
}
|
}
|
||||||
|
|
||||||
c();
|
c();
|
||||||
|
}, () => {
|
||||||
|
// no players were returned after timeout --
|
||||||
|
// csgo seems to do this sometimes if host_players_show is not 2
|
||||||
|
if (this.isCsGo) {
|
||||||
|
if(this.debug) console.log("CSGO server didn't respond with player list");
|
||||||
|
state.players = [];
|
||||||
|
for(let i = 0; i < state.raw.numplayers; i++) {
|
||||||
|
state.players.push({});
|
||||||
|
}
|
||||||
|
c();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue