fixed other players overlapping when one is neither first nor last in lobby

This commit is contained in:
2025-09-27 15:27:06 +01:00
parent b6e818cc49
commit af959744e1
2 changed files with 40 additions and 40 deletions
+3 -3
View File
@@ -71,19 +71,19 @@ func _on_web_client_tcp_client_order_received(playing_order: Array[ClientData])
for index in new_ids.size():
_bets[new_ids[index]] = []
var hand: PlayerHand
if client_ids[index] == _own_client_id:
if new_ids[index] == _own_client_id:
hand = own_player_hand
else:
hand = player_hand_scene.instantiate()
var client_data: ClientData
for client in playing_order:
if client.client_id == client_ids[index]:
if client.client_id == new_ids[index]:
client_data = client
break
hand.set_player_data(client_data) # also for own hand?
marker_positions[index - 1].add_child(hand)
hand_associations[client_ids[index]] = hand
hand_associations[new_ids[index]] = hand
func _on_web_client_tcp_cards_received(cards: Dictionary) -> void:
for client_id in cards.keys():