host shouldnt try to create a second client

This commit is contained in:
2025-08-06 23:38:58 -05:00
parent 63a7762206
commit ca299dbd87

View File

@@ -92,7 +92,7 @@ func setup_multiplayer_peer_client() -> void:
return return
var host_id = Steam.getLobbyOwner(lobby_id) var host_id = Steam.getLobbyOwner(lobby_id)
var err = peer.create_client(host_id) var err = peer.create_client(host_id, 0)
if err != OK: if err != OK:
print("Failed to create client, error: %s" % err) print("Failed to create client, error: %s" % err)
return return
@@ -133,7 +133,9 @@ func _on_lobby_joined(this_lobby_id: int, permissions: int, locked: bool, respon
lobby_id = this_lobby_id lobby_id = this_lobby_id
print("Successfully joined lobby: %s" % lobby_id) print("Successfully joined lobby: %s" % lobby_id)
get_lobby_members() get_lobby_members()
setup_multiplayer_peer_client()
if not multiplayer.is_server():
setup_multiplayer_peer_client()
func get_lobby_members() -> void: func get_lobby_members() -> void: