aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcCrosshairAngle.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-17 18:24:18 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-20 11:10:20 +0300
commit6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 (patch)
treee925740a5c04b1c5c44e725dab04f9b1833cf9e3 /pkg/messages/types/svcCrosshairAngle.go
parentparse netSignOnState flags (diff)
downloadsdp.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/svcCrosshairAngle.go')
-rw-r--r--pkg/messages/types/svcCrosshairAngle.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/messages/types/svcCrosshairAngle.go b/pkg/messages/types/svcCrosshairAngle.go
index e8424e1..b7d234c 100644
--- a/pkg/messages/types/svcCrosshairAngle.go
+++ b/pkg/messages/types/svcCrosshairAngle.go
@@ -3,11 +3,21 @@ package messages
3import "github.com/pektezol/bitreader" 3import "github.com/pektezol/bitreader"
4 4
5type SvcCrosshairAngle struct { 5type SvcCrosshairAngle struct {
6 Angle []int16 6 Angle crosshairAngles
7}
8
9type crosshairAngles struct {
10 X float32
11 Y float32
12 Z float32
7} 13}
8 14
9func ParseSvcCrosshairAngle(reader *bitreader.Reader) SvcCrosshairAngle { 15func ParseSvcCrosshairAngle(reader *bitreader.Reader) SvcCrosshairAngle {
10 return SvcCrosshairAngle{ 16 return SvcCrosshairAngle{
11 Angle: []int16{int16(reader.TryReadBits(16)), int16(reader.TryReadBits(16)), int16(reader.TryReadBits(16))}, 17 Angle: crosshairAngles{
18 X: float32(reader.TryReadBits(16)),
19 Y: float32(reader.TryReadBits(16)),
20 Z: float32(reader.TryReadBits(16)),
21 },
12 } 22 }
13} 23}