From e810abdcaf38b15612b7bc5a731341ec3a98b18a Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Fri, 13 Feb 2026 02:07:38 +0100 Subject: [PATCH] fix(client): use server tick for movement input processing Client was sending Time.get_ticks_msec() (e.g. 12345) as the input tick, but the server's drain_for_tick only processes inputs where tick <= current_tick (a small frame counter). Inputs accumulated in the queue and were never processed, making movement keys unresponsive in live mode. Use GameState.current_tick from the latest snapshot. Co-Authored-By: Claude Opus 4.6 --- client/scripts/autoloads/sim_bridge.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/scripts/autoloads/sim_bridge.gd b/client/scripts/autoloads/sim_bridge.gd index 53551a2bb..9d31763a3 100644 --- a/client/scripts/autoloads/sim_bridge.gd +++ b/client/scripts/autoloads/sim_bridge.gd @@ -181,7 +181,9 @@ func send_input(player_input: Dictionary) -> Error: if action_name.is_empty(): # _action_enum_to_wire already emits push_warning for invalid actions return ERR_INVALID_PARAMETER - var tick: int = player_input.get("timestamp_msec", 0) + # Use the server's current tick so drain_for_tick processes this input immediately. + # The client-side timestamp_msec is only useful for ordering within a frame. + var tick: int = GameState.current_tick var entry: Dictionary = { "tick": tick, "action_name": action_name } # Data variants (e.g. UsePerceptionMode) carry payload var action_data: Variant = player_input.get("action_data")