Fixed user data request/response definitions

This commit is contained in:
Jack Hadrill
2022-03-18 17:33:10 +00:00
parent be9b84de81
commit 0b19b83271
4 changed files with 16 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ export function unpackUserDataRequestMessage (data: Uint8Array): UserDataRequest
const usernameLength = packedData.readUInt16()
const username = packedData.readBytes(usernameLength)
packedData.cursor = 34
const colour = packedData.readBytes(3)
const clientIdLength = packedData.readUInt16()
const clientId = packedData.readBytes(clientIdLength)

View File

@@ -56,6 +56,7 @@ export function unpackUserDataResponseMessage (data: Uint8Array): UserDataRespon
const usernameLength = packedData.readUInt16()
const username = packedData.readBytes(usernameLength)
packedData.cursor = 34
const colour = packedData.readBytes(3)
const clientIdLength = packedData.readUInt16()
const clientId = packedData.readBytes(clientIdLength)