From 6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 17 Sep 2023 18:24:18 +0300 Subject: decide what message types are left --- pkg/messages/types/svcSounds.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/messages/types/svcSounds.go') diff --git a/pkg/messages/types/svcSounds.go b/pkg/messages/types/svcSounds.go index 22d4a66..1553450 100644 --- a/pkg/messages/types/svcSounds.go +++ b/pkg/messages/types/svcSounds.go @@ -4,8 +4,8 @@ import "github.com/pektezol/bitreader" type SvcSounds struct { ReliableSound bool - Size int8 - Length int16 + SoundCount uint8 + Length uint16 Data []byte } @@ -14,11 +14,11 @@ func ParseSvcSounds(reader *bitreader.Reader) SvcSounds { ReliableSound: reader.TryReadBool(), } if svcSounds.ReliableSound { - svcSounds.Size = 1 - svcSounds.Length = int16(reader.TryReadBits(8)) + svcSounds.SoundCount = 1 + svcSounds.Length = uint16(reader.TryReadUInt8()) } else { - svcSounds.Size = int8(reader.TryReadBits(8)) - svcSounds.Length = int16(reader.TryReadBits(16)) + svcSounds.SoundCount = reader.TryReadUInt8() + svcSounds.Length = reader.TryReadUInt16() } svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) return svcSounds -- cgit v1.2.3