diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-23 19:34:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-23 19:34:15 +0300 |
| commit | 482ec66805ddb3724febfb17f3378b11f95f58a3 (patch) | |
| tree | 212fa22a68f7c228b47096a6c7089da90f693cc3 /pkg/packets/headers.go | |
| parent | feat: TONS of user message parsing (#10) (diff) | |
| download | sdp.go-482ec66805ddb3724febfb17f3378b11f95f58a3.tar.gz sdp.go-482ec66805ddb3724febfb17f3378b11f95f58a3.tar.bz2 sdp.go-482ec66805ddb3724febfb17f3378b11f95f58a3.zip | |
retouch parser and header messages (#11)
Diffstat (limited to '')
| -rw-r--r-- | pkg/packets/headers.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/packets/headers.go b/pkg/packets/headers.go index d92b22d..a8de4e7 100644 --- a/pkg/packets/headers.go +++ b/pkg/packets/headers.go | |||
| @@ -42,6 +42,16 @@ func ParseHeaders(reader *bitreader.Reader) Headers { | |||
| 42 | if headers.NetworkProtocol != 2001 { | 42 | if headers.NetworkProtocol != 2001 { |
| 43 | panic("this parser only supports demos from portal 2") | 43 | panic("this parser only supports demos from portal 2") |
| 44 | } | 44 | } |
| 45 | writer.AppendLine("Headers: %+v", headers) | 45 | writer.AppendLine("\nDemo File Stamp: %s", headers.DemoFileStamp) |
| 46 | writer.AppendLine("Demo Protocol: %d", headers.DemoProtocol) | ||
| 47 | writer.AppendLine("Network Protocol: %d", headers.NetworkProtocol) | ||
| 48 | writer.AppendLine("Server Name: %s", headers.ServerName) | ||
| 49 | writer.AppendLine("Client Name: %s", headers.ClientName) | ||
| 50 | writer.AppendLine("Map Name: %s", headers.MapName) | ||
| 51 | writer.AppendLine("Game Directory: %s", headers.GameDirectory) | ||
| 52 | writer.AppendLine("Playback Time: %f", headers.PlaybackTime) | ||
| 53 | writer.AppendLine("Playback Ticks: %d", headers.PlaybackTicks) | ||
| 54 | writer.AppendLine("Playback Frames: %d", headers.PlaybackFrames) | ||
| 55 | writer.AppendLine("Sign On Length: %d\n", headers.SignOnLength) | ||
| 46 | return headers | 56 | return headers |
| 47 | } | 57 | } |