diff options
Diffstat (limited to 'pkg/messages/types/netSetConVar.go')
| -rw-r--r-- | pkg/messages/types/netSetConVar.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/pkg/messages/types/netSetConVar.go b/pkg/messages/types/netSetConVar.go deleted file mode 100644 index 03e9e0d..0000000 --- a/pkg/messages/types/netSetConVar.go +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | package messages | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | ) | ||
| 6 | |||
| 7 | type NetSetConVar struct { | ||
| 8 | Length uint8 | ||
| 9 | ConVars []conVar | ||
| 10 | } | ||
| 11 | |||
| 12 | type conVar struct { | ||
| 13 | Name string | ||
| 14 | Value string | ||
| 15 | } | ||
| 16 | |||
| 17 | func ParseNetSetConVar(reader *bitreader.Reader) NetSetConVar { | ||
| 18 | length := reader.TryReadUInt8() | ||
| 19 | convars := []conVar{} | ||
| 20 | |||
| 21 | for count := 0; count < int(length); count++ { | ||
| 22 | convar := conVar{ | ||
| 23 | Name: reader.TryReadString(), | ||
| 24 | Value: reader.TryReadString(), | ||
| 25 | } | ||
| 26 | |||
| 27 | convars = append(convars, convar) | ||
| 28 | } | ||
| 29 | return NetSetConVar{ | ||
| 30 | Length: length, | ||
| 31 | ConVars: convars, | ||
| 32 | } | ||
| 33 | } | ||