diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-11-06 18:37:11 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-11-06 18:37:11 +0300 |
| commit | 2f8c92f261586f68a976efce0cfcdd0401f402e0 (patch) | |
| tree | 33189cc48987789dff4e7fba0a74d2b2326f0a04 /pkg/messages/types/svcServerInfo.go | |
| parent | convert cm ticks correctly (diff) | |
| download | sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.tar.gz sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.tar.bz2 sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.zip | |
dont try to understand it, feel itlp-parser
Diffstat (limited to 'pkg/messages/types/svcServerInfo.go')
| -rw-r--r-- | pkg/messages/types/svcServerInfo.go | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/pkg/messages/types/svcServerInfo.go b/pkg/messages/types/svcServerInfo.go deleted file mode 100644 index 507b7ca..0000000 --- a/pkg/messages/types/svcServerInfo.go +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | package messages | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | ) | ||
| 6 | |||
| 7 | type SvcServerInfo struct { | ||
| 8 | Protocol uint16 | ||
| 9 | ServerCount uint32 | ||
| 10 | IsHltv bool | ||
| 11 | IsDedicated bool | ||
| 12 | ClientCrc int32 | ||
| 13 | StringTableCrc uint32 | ||
| 14 | MaxServerClasses uint16 | ||
| 15 | MapCrc uint32 | ||
| 16 | PlayerCount uint8 | ||
| 17 | MaxClients uint8 | ||
| 18 | TickInterval float32 | ||
| 19 | Platform string | ||
| 20 | GameDir string | ||
| 21 | MapName string | ||
| 22 | SkyName string | ||
| 23 | HostName string | ||
| 24 | } | ||
| 25 | |||
| 26 | func ParseSvcServerInfo(reader *bitreader.Reader) SvcServerInfo { | ||
| 27 | svcServerInfo := SvcServerInfo{ | ||
| 28 | Protocol: reader.TryReadUInt16(), | ||
| 29 | ServerCount: reader.TryReadUInt32(), | ||
| 30 | IsHltv: reader.TryReadBool(), | ||
| 31 | IsDedicated: reader.TryReadBool(), | ||
| 32 | ClientCrc: reader.TryReadSInt32(), | ||
| 33 | StringTableCrc: reader.TryReadUInt32(), | ||
| 34 | MaxServerClasses: reader.TryReadUInt16(), | ||
| 35 | MapCrc: reader.TryReadUInt32(), | ||
| 36 | PlayerCount: reader.TryReadUInt8(), | ||
| 37 | MaxClients: reader.TryReadUInt8(), | ||
| 38 | TickInterval: reader.TryReadFloat32(), | ||
| 39 | Platform: reader.TryReadStringLength(1), | ||
| 40 | GameDir: reader.TryReadString(), | ||
| 41 | MapName: reader.TryReadString(), | ||
| 42 | SkyName: reader.TryReadString(), | ||
| 43 | HostName: reader.TryReadString(), | ||
| 44 | } | ||
| 45 | |||
| 46 | return svcServerInfo | ||
| 47 | } | ||