diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-11-08 20:50:13 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:38 +0300 |
| commit | 335e1b1b94a46795bab95e3eec5fecb303bb4171 (patch) | |
| tree | cddd561f2fa5c7ae0e44258422da87a817d51b7b /packets/classes/usercmd.go | |
| parent | stringtable done, can't see data properly (diff) | |
| download | sdp.go-335e1b1b94a46795bab95e3eec5fecb303bb4171.tar.gz sdp.go-335e1b1b94a46795bab95e3eec5fecb303bb4171.tar.bz2 sdp.go-335e1b1b94a46795bab95e3eec5fecb303bb4171.zip | |
put class type into individual files
Diffstat (limited to 'packets/classes/usercmd.go')
| -rw-r--r-- | packets/classes/usercmd.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packets/classes/usercmd.go b/packets/classes/usercmd.go index 78e9c58..d3328fd 100644 --- a/packets/classes/usercmd.go +++ b/packets/classes/usercmd.go | |||
| @@ -6,6 +6,23 @@ import ( | |||
| 6 | "github.com/pektezol/bitreader" | 6 | "github.com/pektezol/bitreader" |
| 7 | ) | 7 | ) |
| 8 | 8 | ||
| 9 | type UserCmdInfo struct { | ||
| 10 | CommandNumber int32 | ||
| 11 | TickCount int32 | ||
| 12 | ViewAnglesX float32 | ||
| 13 | ViewAnglesY float32 | ||
| 14 | ViewAnglesZ float32 | ||
| 15 | ForwardMove float32 | ||
| 16 | SideMove float32 | ||
| 17 | UpMove float32 | ||
| 18 | Buttons int32 | ||
| 19 | Impulse byte | ||
| 20 | WeaponSelect int | ||
| 21 | WeaponSubtype int | ||
| 22 | MouseDx int16 | ||
| 23 | MouseDy int16 | ||
| 24 | } | ||
| 25 | |||
| 9 | func ParseUserCmdInfo(data []byte) UserCmdInfo { | 26 | func ParseUserCmdInfo(data []byte) UserCmdInfo { |
| 10 | reader := bitreader.Reader(bytes.NewReader(data), true) | 27 | reader := bitreader.Reader(bytes.NewReader(data), true) |
| 11 | var userCmdInfo UserCmdInfo | 28 | var userCmdInfo UserCmdInfo |