aboutsummaryrefslogtreecommitdiff
path: root/test-client/protocol.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-09 12:11:32 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-09 12:11:32 +0200
commitb0b8a1b439d2c8f54098dd140376e0e26a519298 (patch)
treef6149583ff7719ee2e6cc62e79c791385845f3de /test-client/protocol.ts
parent323c6f56d9046d4cba9b7790deb13a6986fdae66 (diff)
downloadhurrycurry-b0b8a1b439d2c8f54098dd140376e0e26a519298.tar
hurrycurry-b0b8a1b439d2c8f54098dd140376e0e26a519298.tar.bz2
hurrycurry-b0b8a1b439d2c8f54098dd140376e0e26a519298.tar.zst
add leave packet
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r--test-client/protocol.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index 61b2ac07..34efe602 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -30,7 +30,8 @@ export interface Gamedata {
}
export type PacketS =
- { type: "join", name: string, character: number } // You join, sent as first packet.
+ { type: "join", name: string, character: number } // Spawns your character. Dont send it to spectate.
+ | { type: "leave" } // Despawns your character
| { type: "position", pos: Vec2, rot: number, boosting: boolean } // Update your position and rotation in radians (0 is -y)
| { type: "interact", pos: Vec2, edge: boolean } // Interact with some tile. edge is true when pressing and false when releasing interact button
| { type: "communicate", message?: Message, persist: boolean } // Send a message