From 71cdb9cea1309fe710ecf7a3d47e2c475adf0cd0 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 7 Nov 2022 17:53:33 +0300 Subject: done until the hard part --- packets/header.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packets/header.go') 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 ( func ParseHeader(reader *bitreader.ReaderType) { header := Header{ DemoFileStamp: reader.TryReadStringLen(8), - DemoProtocol: uint(reader.TryReadInt32()), - NetworkProtocol: uint(reader.TryReadInt32()), + DemoProtocol: uint32(reader.TryReadInt32()), + NetworkProtocol: uint32(reader.TryReadInt32()), ServerName: reader.TryReadStringLen(260), ClientName: reader.TryReadStringLen(260), MapName: reader.TryReadStringLen(260), GameDirectory: reader.TryReadStringLen(260), PlaybackTime: reader.TryReadFloat32(), - PlaybackTicks: int(reader.TryReadInt32()), - PlaybackFrames: int(reader.TryReadInt32()), - SignOnLength: uint(reader.TryReadInt32()), + PlaybackTicks: int32(reader.TryReadInt32()), + PlaybackFrames: int32(reader.TryReadInt32()), + SignOnLength: uint32(reader.TryReadInt32()), } if header.DemoFileStamp != "HL2DEMO" { panic("Invalid demo file stamp. Make sure a valid demo file is given.") -- cgit v1.2.3