From 09b6da1aab7bb9b89c3b2afbda5d3ff7913ad7e8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 3 Jun 2025 21:14:17 +0200 Subject: update test-client to character struct --- test-client/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test-client/main.ts') 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, -- cgit v1.2.3-70-g09d2