aboutsummaryrefslogtreecommitdiff
path: root/packets/header.go
diff options
context:
space:
mode:
Diffstat (limited to 'packets/header.go')
-rw-r--r--packets/header.go10
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 (
9func ParseHeader(reader *bitreader.ReaderType) { 9func 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.")