aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcSounds.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/messages/types/svcSounds.go')
-rw-r--r--pkg/messages/types/svcSounds.go12
1 files changed, 6 insertions, 6 deletions
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"
4 4
5type SvcSounds struct { 5type SvcSounds struct {
6 ReliableSound bool 6 ReliableSound bool
7 Size int8 7 SoundCount uint8
8 Length int16 8 Length uint16
9 Data []byte 9 Data []byte
10} 10}
11 11
@@ -14,11 +14,11 @@ func ParseSvcSounds(reader *bitreader.Reader) SvcSounds {
14 ReliableSound: reader.TryReadBool(), 14 ReliableSound: reader.TryReadBool(),
15 } 15 }
16 if svcSounds.ReliableSound { 16 if svcSounds.ReliableSound {
17 svcSounds.Size = 1 17 svcSounds.SoundCount = 1
18 svcSounds.Length = int16(reader.TryReadBits(8)) 18 svcSounds.Length = uint16(reader.TryReadUInt8())
19 } else { 19 } else {
20 svcSounds.Size = int8(reader.TryReadBits(8)) 20 svcSounds.SoundCount = reader.TryReadUInt8()
21 svcSounds.Length = int16(reader.TryReadBits(16)) 21 svcSounds.Length = reader.TryReadUInt16()
22 } 22 }
23 svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) 23 svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length))
24 return svcSounds 24 return svcSounds