aboutsummaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-06-03 21:14:17 +0200
committermetamuffin <metamuffin@disroot.org>2025-06-03 21:14:17 +0200
commit09b6da1aab7bb9b89c3b2afbda5d3ff7913ad7e8 (patch)
tree083f35c352657cb3b800cdfce6f08892785e8c49 /test-client/main.ts
parente0201e044482b1a577dac7574bb56d44a20bf011 (diff)
downloadhurrycurry-09b6da1aab7bb9b89c3b2afbda5d3ff7913ad7e8.tar
hurrycurry-09b6da1aab7bb9b89c3b2afbda5d3ff7913ad7e8.tar.bz2
hurrycurry-09b6da1aab7bb9b89c3b2afbda5d3ff7913ad7e8.tar.zst
update test-client to character struct
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index ef38494d..66e3e989 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -50,7 +50,7 @@ document.addEventListener("DOMContentLoaded", async () => {
ws.onclose = () => console.log("close")
ws.onopen = () => {
console.log("open")
- send({ type: "join", name: "test", character: Math.floor(Math.random() * 255), class: "chef" })
+ send({ type: "join", name: "test", character: { color: Math.floor(Math.random() * 100), hairstyle: 0, headwear: 0 }, class: "chef" })
}
canvas = document.createElement("canvas");
@@ -156,7 +156,7 @@ function packet(p: PacketC) {
id: p.id,
position: { x: p.position[0], y: p.position[1], },
anim_position: { x: p.position[0], y: p.position[1] },
- character: p.character,
+ character: p.character.color,
class: p.class,
name: p.name,
rot: 0,