diff options
Diffstat (limited to 'pkg/packets/headers.go')
| -rw-r--r-- | pkg/packets/headers.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/packets/headers.go b/pkg/packets/headers.go index 543476b..dbeab87 100644 --- a/pkg/packets/headers.go +++ b/pkg/packets/headers.go | |||
| @@ -20,19 +20,19 @@ type Headers struct { | |||
| 20 | SignOnLength int32 | 20 | SignOnLength int32 |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | func ParseHeaders(reader *bitreader.ReaderType) Headers { | 23 | func ParseHeaders(reader *bitreader.Reader) Headers { |
| 24 | headers := Headers{ | 24 | headers := Headers{ |
| 25 | DemoFileStamp: reader.TryReadString(), | 25 | DemoFileStamp: reader.TryReadString(), |
| 26 | DemoProtocol: int32(reader.TryReadInt32()), | 26 | DemoProtocol: int32(reader.TryReadSInt32()), |
| 27 | NetworkProtocol: int32(reader.TryReadInt32()), | 27 | NetworkProtocol: int32(reader.TryReadSInt32()), |
| 28 | ServerName: reader.TryReadStringLen(260), | 28 | ServerName: reader.TryReadStringLength(260), |
| 29 | ClientName: reader.TryReadStringLen(260), | 29 | ClientName: reader.TryReadStringLength(260), |
| 30 | MapName: reader.TryReadStringLen(260), | 30 | MapName: reader.TryReadStringLength(260), |
| 31 | GameDirectory: reader.TryReadStringLen(260), | 31 | GameDirectory: reader.TryReadStringLength(260), |
| 32 | PlaybackTime: reader.TryReadFloat32(), | 32 | PlaybackTime: reader.TryReadFloat32(), |
| 33 | PlaybackTicks: int32(reader.TryReadInt32()), | 33 | PlaybackTicks: int32(reader.TryReadSInt32()), |
| 34 | PlaybackFrames: int32(reader.TryReadInt32()), | 34 | PlaybackFrames: int32(reader.TryReadSInt32()), |
| 35 | SignOnLength: int32(reader.TryReadInt32()), | 35 | SignOnLength: int32(reader.TryReadSInt32()), |
| 36 | } | 36 | } |
| 37 | if headers.DemoFileStamp != "HL2DEMO" { | 37 | if headers.DemoFileStamp != "HL2DEMO" { |
| 38 | panic("invalid demo file stamp") | 38 | panic("invalid demo file stamp") |