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/svcCrosshairAngle.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/svcCrosshairAngle.go')
| -rw-r--r-- | pkg/messages/types/svcCrosshairAngle.go | 14 |
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 | |||
| 3 | import "github.com/pektezol/bitreader" | 3 | import "github.com/pektezol/bitreader" |
| 4 | 4 | ||
| 5 | type SvcCrosshairAngle struct { | 5 | type SvcCrosshairAngle struct { |
| 6 | Angle []int16 | 6 | Angle crosshairAngles |
| 7 | } | ||
| 8 | |||
| 9 | type crosshairAngles struct { | ||
| 10 | X float32 | ||
| 11 | Y float32 | ||
| 12 | Z float32 | ||
| 7 | } | 13 | } |
| 8 | 14 | ||
| 9 | func ParseSvcCrosshairAngle(reader *bitreader.Reader) SvcCrosshairAngle { | 15 | func 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 | } |