Merge pull request #296 from nickdnk/master

Use enum for all AppIds
This commit is contained in:
Michael Morrison 2022-07-19 17:05:55 -05:00 committed by GitHub
commit b191d895f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -9,7 +9,11 @@ const AppId = {
Ship: 2400,
DayZ: 221100,
Rust: 252490,
CSGO: 730
CSGO: 730,
CS_Source: 240,
EternalSilence: 17550,
Insurgency_MIC: 17700,
Source_SDK_Base_2006: 215
};
class Valve extends Core {
@ -115,10 +119,10 @@ class Valve extends Core {
// from https://developer.valvesoftware.com/wiki/Server_queries
if(
state.raw.protocol === 7 && (
state.raw.appId === 215
|| state.raw.appId === 17550
|| state.raw.appId === 17700
|| state.raw.appId === 240
state.raw.appId === AppId.Source_SDK_Base_2006
|| state.raw.appId === AppId.EternalSilence
|| state.raw.appId === AppId.Insurgency_MIC
|| state.raw.appId === AppId.CS_Source
)
) {
this._skipSizeInSplitHeader = true;