From 84612614c563b6f92c22ccd313517bdf5cc9974a Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 7 Mar 2026 09:33:56 -0500 Subject: [PATCH] Fix game state push type and reconnect flow in Game.gd - Server pushes "game.state_update" not "game.state_update.push" - On "AlreadyStarted" ack (reconnect), explicitly fetch state via game.get_state instead of expecting state in the ready ack (it's never there) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Client/origin-client/autoloads/Game.gd | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Client/origin-client/autoloads/Game.gd b/Client/origin-client/autoloads/Game.gd index 39eada8..21fee42 100644 --- a/Client/origin-client/autoloads/Game.gd +++ b/Client/origin-client/autoloads/Game.gd @@ -124,6 +124,18 @@ func board_height() -> int: func send_ready() -> void: Network.request("game.ready", + { "sessionId": session_id }, + func(_t: String, p: Variant) -> void: + var d := p as Dictionary + if d.get("status", "") == "AlreadyStarted": + _fetch_state() + else: + _apply_state_from_payload(p), + func(_c: String, _m: String) -> void: pass) + + +func _fetch_state() -> void: + Network.request("game.get_state", { "sessionId": session_id }, func(_t: String, p: Variant) -> void: _apply_state_from_payload(p), func(_c: String, _m: String) -> void: pass) @@ -231,7 +243,7 @@ func _on_server_push(type: String, payload: Variant) -> void: opponent_name = oname match_found.emit(sid, oname, orank) - "game.state_update.push": + "game.state_update": var d := payload as Dictionary var s := d.get("state", {}) as Dictionary if not s.is_empty():