From 66cdba9c1220e59905232c96eb3fb5ffb6bcda17 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 24 Jun 2025 13:23:55 +0200 Subject: update protocol def for movement_sync; fix #337 --- test-client/protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-client') diff --git a/test-client/protocol.ts b/test-client/protocol.ts index fb8c11a8..8e9ca75e 100644 --- a/test-client/protocol.ts +++ b/test-client/protocol.ts @@ -54,7 +54,7 @@ export type PacketC = | { type: "add_player", id: PlayerID, name: string, position: Vec2, character: Character, class: PlayerClass } // Somebody else joined (or was already in the game) | { type: "remove_player", id: PlayerID } // Somebody left | { type: "movement", player: PlayerID, pos: Vec2, rot: number, boost: boolean, dir: Vec2 } // Update the movement of a players (your own position is included here) - | { type: "movement_sync" } // Your movement is difference on the server, you should update your position from a `position` packet + | { type: "movement_sync", player: PlayerID } // Your movement is difference on the server, you should update your position from a `position` packet | { type: "move_item", from: ItemLocation, to: ItemLocation } // Item moved | { type: "set_item", location: ItemLocation, item?: ItemIndex } // the item contained in a tile or player changed | { type: "set_progress", item: ItemLocation, position: number, speed: number, warn: boolean, player?: PlayerID } // A tile is doing something. position goes from 0 to 1, speed unit is in 1 per second -- cgit v1.2.3-70-g09d2