diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-17 18:24:18 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-20 11:10:20 +0300 |
| commit | 6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 (patch) | |
| tree | e925740a5c04b1c5c44e725dab04f9b1833cf9e3 /pkg/messages/types/netTick.go | |
| parent | parse netSignOnState flags (diff) | |
| download | sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.gz sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.bz2 sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.zip | |
decide what message types are left
Diffstat (limited to 'pkg/messages/types/netTick.go')
| -rw-r--r-- | pkg/messages/types/netTick.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/messages/types/netTick.go b/pkg/messages/types/netTick.go index 2870c9c..dc941ad 100644 --- a/pkg/messages/types/netTick.go +++ b/pkg/messages/types/netTick.go | |||
| @@ -3,15 +3,15 @@ package messages | |||
| 3 | import "github.com/pektezol/bitreader" | 3 | import "github.com/pektezol/bitreader" |
| 4 | 4 | ||
| 5 | type NetTick struct { | 5 | type NetTick struct { |
| 6 | Tick int32 | 6 | Tick uint32 |
| 7 | HostFrameTime float32 | 7 | HostFrameTime float32 |
| 8 | HostFrameTimeStdDeviation float32 | 8 | HostFrameTimeStdDeviation float32 |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | func ParseNetTick(reader *bitreader.Reader) NetTick { | 11 | func ParseNetTick(reader *bitreader.Reader) NetTick { |
| 12 | return NetTick{ | 12 | return NetTick{ |
| 13 | Tick: int32(reader.TryReadBits(32)), | 13 | Tick: reader.TryReadUInt32(), |
| 14 | HostFrameTime: float32(reader.TryReadBits(16)) / 1e5, | 14 | HostFrameTime: float32(reader.TryReadUInt16()) / 1e5, |
| 15 | HostFrameTimeStdDeviation: float32(reader.TryReadBits(16)) / 1e5, | 15 | HostFrameTimeStdDeviation: float32(reader.TryReadUInt16()) / 1e5, |
| 16 | } | 16 | } |
| 17 | } | 17 | } |