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 <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -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 ───
|
||||
|
||||
Reference in New Issue
Block a user