diff options
| author | 2026-02-16 16:31:54 -0500 | |
|---|---|---|
| committer | 2026-02-16 16:31:54 -0500 | |
| commit | ca90ebdfa8789654766c5d7969baa7afacd9ebd2 (patch) | |
| tree | 9693e0c7a5af6713f4c5e39372dcf22d05844ec3 /client/quake/move.go | |
Diffstat (limited to 'client/quake/move.go')
| -rw-r--r-- | client/quake/move.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/client/quake/move.go b/client/quake/move.go new file mode 100644 index 0000000..600c1fd --- /dev/null +++ b/client/quake/move.go @@ -0,0 +1,30 @@ +package quake + +import ( + "github.com/osm/quake/packet/command/deltausercommand" + "github.com/osm/quake/packet/command/move" + "github.com/osm/quake/protocol" +) + +func (c *Client) getMove(seq uint32) *move.Command { + mov := move.Command{ + Null: &deltausercommand.Command{ + ProtocolVersion: c.ctx.GetProtocolVersion(), + Bits: protocol.CMForward | protocol.CMSide | protocol.CMUp | protocol.CMButtons, + CMForward16: 0, + CMSide16: 0, + CMUp16: 0, + CMButtons: 0, + CMMsec: 13, // ~72hz + }, + Old: &deltausercommand.Command{ + ProtocolVersion: c.ctx.GetProtocolVersion(), + }, + New: &deltausercommand.Command{ + ProtocolVersion: c.ctx.GetProtocolVersion(), + }, + } + + mov.Checksum = mov.GetChecksum(seq - 1) + return &mov +} |
