start adding version on new protocols WIP

This commit is contained in:
Pedro Ivo Hudson 2024-02-04 11:25:03 -03:00
parent 9b1f22c8b6
commit eea868a22a
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ export default class assettocorsa extends Core {
state.gamePort = serverInfo.port
state.raw.carInfo = carInfo.Cars
state.raw.serverInfo = serverInfo
state.version = state.raw.serverInfo.poweredBy
for (const car of carInfo.Cars) {
if (car.IsConnected) {

View File

@ -16,6 +16,7 @@ export default class mumbleping extends Core {
state.raw.versionMajor = reader.uint(1)
state.raw.versionMinor = reader.uint(1)
state.raw.versionPatch = reader.uint(1)
state.version = state.raw.versionMajor + '.' + state.raw.versionMinor + '.' + state.raw.versionPatch
reader.skip(8)
state.numplayers = reader.uint(4)
state.maxplayers = reader.uint(4)