host shouldnt try to create a second client
This commit is contained in:
@@ -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,6 +133,8 @@ 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()
|
||||||
|
|
||||||
|
if not multiplayer.is_server():
|
||||||
setup_multiplayer_peer_client()
|
setup_multiplayer_peer_client()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user