fixed other players overlapping when one is neither first nor last in lobby
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user