aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-17 14:22:47 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-20 11:10:16 +0300
commite264aab31b6cdc67d962600cb9b4fb9d5da1b9db (patch)
tree74bafeb9ded44b2ea6d98df7039607ab5aaa68c8 /pkg
parentbuild for arm64 instead of arm (diff)
downloadsdp.go-e264aab31b6cdc67d962600cb9b4fb9d5da1b9db.tar.gz
sdp.go-e264aab31b6cdc67d962600cb9b4fb9d5da1b9db.tar.bz2
sdp.go-e264aab31b6cdc67d962600cb9b4fb9d5da1b9db.zip
fix netTick calculations
Diffstat (limited to 'pkg')
-rw-r--r--pkg/messages/types/netTick.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/messages/types/netTick.go b/pkg/messages/types/netTick.go
index bd3464a..2870c9c 100644
--- a/pkg/messages/types/netTick.go
+++ b/pkg/messages/types/netTick.go
@@ -4,14 +4,14 @@ import "github.com/pektezol/bitreader"
4 4
5type NetTick struct { 5type NetTick struct {
6 Tick int32 6 Tick int32
7 HostFrameTime int16 7 HostFrameTime float32
8 HostFrameTimeStdDeviation int16 8 HostFrameTimeStdDeviation float32
9} 9}
10 10
11func ParseNetTick(reader *bitreader.Reader) NetTick { 11func ParseNetTick(reader *bitreader.Reader) NetTick {
12 return NetTick{ 12 return NetTick{
13 Tick: int32(reader.TryReadBits(32)), 13 Tick: int32(reader.TryReadBits(32)),
14 HostFrameTime: int16(reader.TryReadBits(16) / 10e5), 14 HostFrameTime: float32(reader.TryReadBits(16)) / 1e5,
15 HostFrameTimeStdDeviation: int16(reader.TryReadBits(16) / 10e5), 15 HostFrameTimeStdDeviation: float32(reader.TryReadBits(16)) / 1e5,
16 } 16 }
17} 17}