From 286ccf26c75148a3637c60c6a431e54e8f08ae30 Mon Sep 17 00:00:00 2001 From: dingo Date: Tue, 14 Apr 2026 23:24:28 -0400 Subject: [PATCH] fix(spectate): skip hand rebuild and clear draw popups when spectating Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Client/origin-client/scenes/game/game_screen.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 4da92ea..0e31f01 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -403,6 +403,11 @@ func _exit_tree() -> void: func _setup_spectator_ui() -> void: + # Clear any pending draw popups — spectators have no hand. + _pending_popup_cards.clear() + if is_instance_valid(_popup_layer): + _popup_layer.visible = false + # "SPECTATING" label at top-center. var lbl := Label.new() lbl.text = "SPECTATING" @@ -5295,7 +5300,8 @@ func _on_state_updated(state: Dictionary) -> void: " my_player_found=", not Game.get_my_player().is_empty(), " hand_size=", hand.size(), " my_id=", Auth.user_id.substr(0,8)) - _rebuild_hand(hand) + if not _is_spectating: + _rebuild_hand(hand) _update_hud(state) # ── Update position/HP tracking now so the next state update is correct ───