From c44dadec456f2709e411246831f40b985f4ca293 Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 13 Mar 2026 21:32:19 -0400 Subject: [PATCH] Fix: clear game state on game.over to prevent matchmaking re-entry bug When game.over was received, Game.state was not cleared. If both players re-queued and matched again, the new GameScreen saw non-empty state and called _on_state_updated instead of send_ready(), leaving the new session stuck in Initializing. Clearing state = {} before emitting game_over fixes this. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/Client/origin-client/autoloads/Game.gd b/Client/origin-client/autoloads/Game.gd index b23aa2e..90c8133 100644 --- a/Client/origin-client/autoloads/Game.gd +++ b/Client/origin-client/autoloads/Game.gd @@ -279,6 +279,7 @@ func _on_server_push(type: String, payload: Variant) -> void: var wc : String = str(d.get("winCondition", "")) var wd : int = int(d.get("winnerRankDelta", 0)) var ld : int = int(d.get("loserRankDelta", 0)) + state = {} # Clear stale state so a new GameScreen calls send_ready() on the next match game_over.emit(winner, wc, wd, ld) "game.session_abandoned":