aboutsummaryrefslogtreecommitdiffstats
path: root/packet/command/updateentertime/updateentertime.go
diff options
context:
space:
mode:
authorGravatar BanceDev 2026-02-16 16:31:54 -0500
committerGravatar BanceDev 2026-02-16 16:31:54 -0500
commitca90ebdfa8789654766c5d7969baa7afacd9ebd2 (patch)
tree9693e0c7a5af6713f4c5e39372dcf22d05844ec3 /packet/command/updateentertime/updateentertime.go
initial commitHEADmain
Diffstat (limited to '')
-rw-r--r--packet/command/updateentertime/updateentertime.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/packet/command/updateentertime/updateentertime.go b/packet/command/updateentertime/updateentertime.go
new file mode 100644
index 0000000..da670e2
--- /dev/null
+++ b/packet/command/updateentertime/updateentertime.go
@@ -0,0 +1,37 @@
+package updateentertime
+
+import (
+ "github.com/osm/quake/common/buffer"
+ "github.com/osm/quake/common/context"
+ "github.com/osm/quake/protocol"
+)
+
+type Command struct {
+ PlayerIndex byte
+ EnterTime float32
+}
+
+func (cmd *Command) Bytes() []byte {
+ buf := buffer.New()
+
+ buf.PutByte(protocol.SVCUpdateEnterTime)
+ buf.PutByte(cmd.PlayerIndex)
+ buf.PutFloat32(cmd.EnterTime)
+
+ return buf.Bytes()
+}
+
+func Parse(ctx *context.Context, buf *buffer.Buffer) (*Command, error) {
+ var err error
+ var cmd Command
+
+ if cmd.PlayerIndex, err = buf.ReadByte(); err != nil {
+ return nil, err
+ }
+
+ if cmd.EnterTime, err = buf.GetFloat32(); err != nil {
+ return nil, err
+ }
+
+ return &cmd, nil
+}
title='2024-09-23 12:08:03 -0400'>2024-09-23implemented background process operatorGravatar BanceDev 6-154/+238 2024-09-23implemented piping into new chaining methodGravatar BanceDev 1-10/+30 2024-09-18fixed && chaining for builtinsGravatar BanceDev 2-23/+31 2024-09-18added basic && chainingGravatar BanceDev 2-8/+73 2024-09-17changed tokenizer to handle all the chaining operatorsGravatar BanceDev 3-20/+78 2024-09-17Update README.mdGravatar Lance Borden 1-0/+1 2024-09-13added better clarification to help menuGravatar BanceDev 1-1/+2 2024-09-13improved installation instructionsGravatar BanceDev 1-3/+3 2024-09-12v0.1.1Gravatar BanceDev 1-1/+1 2024-09-12fixed bug in input buffer handling due to misplaced printGravatar BanceDev 2-5/+8 2024-09-12Update build.yml checkout v4Gravatar Lance Borden 1-1/+1 2024-09-12Update build.yml to artifact v4Gravatar Lance Borden 1-1/+1 2024-09-12fixed exit status issue with non interative modeGravatar BanceDev 1-1/+1 2024-09-12added non interative mode for running lua scriptsGravatar BanceDev 2-4/+28 2024-09-12temporary github action fix until non-interactive mode is implementedGravatar BanceDev 1-2/+2 2024-09-12attempt to update build script to accept input into lush shellGravatar BanceDev 2-4/+6 2024-09-12prevent lush workflow from getting stuck in testsGravatar Lance Borden 1-1/+4 2024-09-12removed chsh in workflowGravatar Lance Borden 1-4/+1