summaryrefslogtreecommitdiff
path: root/test-client/protocol.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-05-30 16:01:27 +0200
committermetamuffin <metamuffin@disroot.org>2025-05-30 16:01:27 +0200
commitb19e638013fea591cb942c16648a5b33283491f9 (patch)
tree82b04e92c971241e9dec826237004e740d328139 /test-client/protocol.ts
parent46a74dbf8231bd4bd5a905f20273bc737fad6787 (diff)
downloadhurrycurry-b19e638013fea591cb942c16648a5b33283491f9.tar
hurrycurry-b19e638013fea591cb942c16648a5b33283491f9.tar.bz2
hurrycurry-b19e638013fea591cb942c16648a5b33283491f9.tar.zst
add `idle` packet to protocol def
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r--test-client/protocol.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index a41c19d7..d1cd9c07 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -39,6 +39,7 @@ export interface Gamedata {
export type PacketS =
{ type: "join", name: string, character: number, class: PlayerClass } // Spawns a new character. The server replies with "joined". Dont send it to spectate.
| { type: "leave", player: PlayerID } // Despawns a character
+ | { type: "idle", paused: boolean } // Indicates that this player is actively participating in the game right now.
| { type: "movement", player: PlayerID, pos: Vec2, dir: Vec2, boost: boolean }
| { type: "interact", player: PlayerID, pos?: Vec2, hand: number } // Interact with some tile. pos is a position when pressing and null when releasing interact button
| { type: "communicate", player: PlayerID, message?: Message, timeout?: number, pin?: boolean } // Sends a message