diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-07 15:25:48 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-07 15:25:48 +0200 |
commit | 3ebb7582afc24992674cf6ebc0d6f314569d727f (patch) | |
tree | 093d355bb411b051e4e6ba3d80bb061f77b4939b /test-client/protocol.ts | |
parent | 120eb58c117f251fc548275a7440c2b2492ec6aa (diff) | |
download | hurrycurry-3ebb7582afc24992674cf6ebc0d6f314569d727f.tar hurrycurry-3ebb7582afc24992674cf6ebc0d6f314569d727f.tar.bz2 hurrycurry-3ebb7582afc24992674cf6ebc0d6f314569d727f.tar.zst |
transmit boosting state
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r-- | test-client/protocol.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts index fd0f8d43..f3bb8acb 100644 --- a/test-client/protocol.ts +++ b/test-client/protocol.ts @@ -30,7 +30,7 @@ export interface Gamedata { export type PacketS = { type: "join", name: string, character: number } // You join, sent as first packet. - | { type: "position", pos: Vec2, rot: number } // Update your position and rotation in radians (0 is -y) + | { 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 | { type: "collide", player: PlayerID, force: Vec2 } // Apply force to another player as a result of a collision @@ -40,7 +40,7 @@ export type PacketC = | { type: "data", data: Gamedata } // Game data was changed | { type: "add_player", id: PlayerID, name: string, position: Vec2, character: number } // Somebody else joined (or was already in the game) | { type: "remove_player", id: PlayerID } // Somebody left - | { type: "position", player: PlayerID, pos: Vec2, rot: number } // Update the position of a players (your own position is included here) + | { type: "position", player: PlayerID, pos: Vec2, rot: number, boosting: boolean } // Update the position of a players (your own position is included here) | { 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, progress?: number, warn: boolean } // A tile is doing something. progress goes from 0 to 1, then null when finished |