Lobby now populates users correctly

This commit is contained in:
Chris Bell 2024-12-12 21:10:33 -06:00
parent 30fa3b4adb
commit b576e32718
2 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,6 @@ func read_p2p_packet() -> void:
"handshake":
GameConsole.print_line("Handshake from: " + read_data["username"])
get_lobby_members()
user_joined_lobby.emit(packet_sender, read_data["username"])
"chat":
GameConsole.print_line(read_data["username"] + ": " + read_data["message"])
_:

View File

@ -52,6 +52,8 @@ func _on_join_button_pressed() -> void:
func _on_user_joined_lobby(user_id: int, username: String) -> void:
if user_id == network_manager.steam_id:
return
print(user_id, Steam.getFriendPersonaName(user_id))
var user_box: Node = user_box_prefab.instantiate()
user_box.name = "UserBox_" + str(user_id)