diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-17 18:24:18 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-20 11:10:20 +0300 |
| commit | 6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 (patch) | |
| tree | e925740a5c04b1c5c44e725dab04f9b1833cf9e3 /pkg/messages/types/netSetConVar.go | |
| parent | parse netSignOnState flags (diff) | |
| download | sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.gz sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.bz2 sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.zip | |
decide what message types are left
Diffstat (limited to 'pkg/messages/types/netSetConVar.go')
| -rw-r--r-- | pkg/messages/types/netSetConVar.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/messages/types/netSetConVar.go b/pkg/messages/types/netSetConVar.go index f04f564..44b75b9 100644 --- a/pkg/messages/types/netSetConVar.go +++ b/pkg/messages/types/netSetConVar.go | |||
| @@ -3,7 +3,7 @@ package messages | |||
| 3 | import "github.com/pektezol/bitreader" | 3 | import "github.com/pektezol/bitreader" |
| 4 | 4 | ||
| 5 | type NetSetConVar struct { | 5 | type NetSetConVar struct { |
| 6 | Length int8 | 6 | Length uint8 |
| 7 | ConVars []conVar | 7 | ConVars []conVar |
| 8 | } | 8 | } |
| 9 | 9 | ||
| @@ -13,7 +13,7 @@ type conVar struct { | |||
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | func ParseNetSetConVar(reader *bitreader.Reader) NetSetConVar { | 15 | func ParseNetSetConVar(reader *bitreader.Reader) NetSetConVar { |
| 16 | length := reader.TryReadBits(8) | 16 | length := reader.TryReadUInt8() |
| 17 | convars := []conVar{} | 17 | convars := []conVar{} |
| 18 | for count := 0; count < int(length); count++ { | 18 | for count := 0; count < int(length); count++ { |
| 19 | convar := conVar{ | 19 | convar := conVar{ |
| @@ -23,7 +23,7 @@ func ParseNetSetConVar(reader *bitreader.Reader) NetSetConVar { | |||
| 23 | convars = append(convars, convar) | 23 | convars = append(convars, convar) |
| 24 | } | 24 | } |
| 25 | return NetSetConVar{ | 25 | return NetSetConVar{ |
| 26 | Length: int8(length), | 26 | Length: length, |
| 27 | ConVars: convars, | 27 | ConVars: convars, |
| 28 | } | 28 | } |
| 29 | } | 29 | } |