From b85c784d954e1931e9d56e74b4acf794ffbc0dd4 Mon Sep 17 00:00:00 2001 From: Nicolai Cornelis Date: Wed, 20 Jul 2022 00:02:33 +0200 Subject: [PATCH] Use enum for all AppIds --- protocols/valve.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/protocols/valve.js b/protocols/valve.js index 00f71f9..0a24d6e 100644 --- a/protocols/valve.js +++ b/protocols/valve.js @@ -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;