diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-06-15 13:58:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 13:58:30 +0300 |
| commit | 77e4b066cb8d506b4bc944ab4eb2d6e4679e2202 (patch) | |
| tree | 1d549eca619ed36cb881e487cb054c4643ac8376 /pkg/messages/types/svcGetCvarValue.go | |
| parent | change project name to sdp.go (diff) | |
| download | sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.gz sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.bz2 sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.zip | |
enable multithreading with goroutines (#20)
Diffstat (limited to 'pkg/messages/types/svcGetCvarValue.go')
| -rw-r--r-- | pkg/messages/types/svcGetCvarValue.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/messages/types/svcGetCvarValue.go b/pkg/messages/types/svcGetCvarValue.go index 5deb9ef..1c3e54c 100644 --- a/pkg/messages/types/svcGetCvarValue.go +++ b/pkg/messages/types/svcGetCvarValue.go | |||
| @@ -2,20 +2,20 @@ package messages | |||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "github.com/pektezol/bitreader" | 4 | "github.com/pektezol/bitreader" |
| 5 | "github.com/pektezol/sdp.go/pkg/writer" | 5 | "github.com/pektezol/sdp.go/pkg/types" |
| 6 | ) | 6 | ) |
| 7 | 7 | ||
| 8 | type SvcGetCvarValue struct { | 8 | type SvcGetCvarValue struct { |
| 9 | Cookie int32 | 9 | Cookie int32 `json:"cookie"` |
| 10 | CvarName string | 10 | CvarName string `json:"cvar_name"` |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | func ParseSvcGetCvarValue(reader *bitreader.Reader) SvcGetCvarValue { | 13 | func ParseSvcGetCvarValue(reader *bitreader.Reader, demo *types.Demo) SvcGetCvarValue { |
| 14 | svcGetCvarValue := SvcGetCvarValue{ | 14 | svcGetCvarValue := SvcGetCvarValue{ |
| 15 | Cookie: reader.TryReadSInt32(), | 15 | Cookie: reader.TryReadSInt32(), |
| 16 | CvarName: reader.TryReadString(), | 16 | CvarName: reader.TryReadString(), |
| 17 | } | 17 | } |
| 18 | writer.TempAppendLine("\t\tCookie: %d", svcGetCvarValue.Cookie) | 18 | demo.Writer.TempAppendLine("\t\tCookie: %d", svcGetCvarValue.Cookie) |
| 19 | writer.TempAppendLine("\t\tCvar: \"%s\"", svcGetCvarValue.CvarName) | 19 | demo.Writer.TempAppendLine("\t\tCvar: \"%s\"", svcGetCvarValue.CvarName) |
| 20 | return svcGetCvarValue | 20 | return svcGetCvarValue |
| 21 | } | 21 | } |