diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-11-07 17:53:33 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:37 +0300 |
| commit | 71cdb9cea1309fe710ecf7a3d47e2c475adf0cd0 (patch) | |
| tree | c70a0eca913380e08cd49b5b02ed24f626ec454f /packets/header.go | |
| parent | starting fresh for the third time (diff) | |
| download | sdp.go-71cdb9cea1309fe710ecf7a3d47e2c475adf0cd0.tar.gz sdp.go-71cdb9cea1309fe710ecf7a3d47e2c475adf0cd0.tar.bz2 sdp.go-71cdb9cea1309fe710ecf7a3d47e2c475adf0cd0.zip | |
done until the hard part
Diffstat (limited to 'packets/header.go')
| -rw-r--r-- | packets/header.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packets/header.go b/packets/header.go index 60cd146..c4172d9 100644 --- a/packets/header.go +++ b/packets/header.go | |||
| @@ -9,16 +9,16 @@ import ( | |||
| 9 | func ParseHeader(reader *bitreader.ReaderType) { | 9 | func ParseHeader(reader *bitreader.ReaderType) { |
| 10 | header := Header{ | 10 | header := Header{ |
| 11 | DemoFileStamp: reader.TryReadStringLen(8), | 11 | DemoFileStamp: reader.TryReadStringLen(8), |
| 12 | DemoProtocol: uint(reader.TryReadInt32()), | 12 | DemoProtocol: uint32(reader.TryReadInt32()), |
| 13 | NetworkProtocol: uint(reader.TryReadInt32()), | 13 | NetworkProtocol: uint32(reader.TryReadInt32()), |
| 14 | ServerName: reader.TryReadStringLen(260), | 14 | ServerName: reader.TryReadStringLen(260), |
| 15 | ClientName: reader.TryReadStringLen(260), | 15 | ClientName: reader.TryReadStringLen(260), |
| 16 | MapName: reader.TryReadStringLen(260), | 16 | MapName: reader.TryReadStringLen(260), |
| 17 | GameDirectory: reader.TryReadStringLen(260), | 17 | GameDirectory: reader.TryReadStringLen(260), |
| 18 | PlaybackTime: reader.TryReadFloat32(), | 18 | PlaybackTime: reader.TryReadFloat32(), |
| 19 | PlaybackTicks: int(reader.TryReadInt32()), | 19 | PlaybackTicks: int32(reader.TryReadInt32()), |
| 20 | PlaybackFrames: int(reader.TryReadInt32()), | 20 | PlaybackFrames: int32(reader.TryReadInt32()), |
| 21 | SignOnLength: uint(reader.TryReadInt32()), | 21 | SignOnLength: uint32(reader.TryReadInt32()), |
| 22 | } | 22 | } |
| 23 | if header.DemoFileStamp != "HL2DEMO" { | 23 | if header.DemoFileStamp != "HL2DEMO" { |
| 24 | panic("Invalid demo file stamp. Make sure a valid demo file is given.") | 24 | panic("Invalid demo file stamp. Make sure a valid demo file is given.") |