@@ -137,6 +137,14 @@ function handle(ctx, data)
137137 versionPrefix = get_var (" GameVersionPrefix" )
138138 serverPort = get_port (" main" )
139139
140+
141+ edfGameIdStr = get_var (" SteamAppId" )
142+ edfGameId = nil
143+ if edfGameIdStr ~= nil then
144+ edfGameId = tonumber (edfGameIdStr )
145+ end
146+
147+
140148 -- EDF & 0x80: Port
141149 -- EDF & 0x10: SteamID
142150 -- EDF & 0x20 Keywords
@@ -149,7 +157,6 @@ function handle(ctx, data)
149157 edfKeywords = get_var (" GameKeywords" ) or " ,OWNINGID:90202064633057281,OWNINGNAME:90202064633057281,NUMOPENPUBCONN:50,P2PADDR:90202064633057281,P2PPORT:" ..
150158 serverPort .. " ,LEGACY_i:0"
151159
152- edfGameId = " a00f000000000000"
153160
154161 serverinfopacket = ServeInfoPacket :new ()
155162 serverinfopacket .name = name
@@ -226,6 +233,10 @@ function Packet:appendByte(data)
226233 self .bytes = self .bytes .. string.char (data )
227234end
228235
236+ function Packet :appendRawBytes (data )
237+ self .bytes = self .bytes .. data
238+ end
239+
229240function Packet :appendShort (num )
230241 self .bytes = self .bytes .. string .fromhex (number_to_little_endian_short (num ))
231242end
@@ -318,7 +329,8 @@ function ServeInfoPacket:GetRawPacket()
318329 p :appendString (self .edfKeywords )
319330 end
320331 if self .edfGameId ~= nil then
321- p :appendHex (self .edfGameId )
332+ local bytes = string.pack (" <i8" , self .edfGameId )
333+ p :appendRawBytes (bytes )
322334 end
323335
324336
0 commit comments