aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcCrosshairAngle.go
blob: b7d234c258f77608ab1e35bbcca524fca8461ab2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package messages

import "github.com/pektezol/bitreader"

type SvcCrosshairAngle struct {
	Angle crosshairAngles
}

type crosshairAngles struct {
	X float32
	Y float32
	Z float32
}

func ParseSvcCrosshairAngle(reader *bitreader.Reader) SvcCrosshairAngle {
	return SvcCrosshairAngle{
		Angle: crosshairAngles{
			X: float32(reader.TryReadBits(16)),
			Y: float32(reader.TryReadBits(16)),
			Z: float32(reader.TryReadBits(16)),
		},
	}
}