From 5b35174ffab42f0331f1a6527ef6bbab7a3dbdcb Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 21 Dec 2024 14:15:11 +0100 Subject: next commit --- Game/Network.gd | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Game/Network.gd') diff --git a/Game/Network.gd b/Game/Network.gd index 2858d98..4413548 100644 --- a/Game/Network.gd +++ b/Game/Network.gd @@ -61,13 +61,15 @@ func _on_disconnected_from_server(): func _on_peer_connected(id: int): print(multiplayer.get_unique_id(), ": peer connected: ", id) - ask_game_running.rpc_id(id) - is_game_running.connect(func(is_running: bool): - if not is_running: - add_to_players.rpc_id(id, inst_to_dict(Client.player)) - elif is_running: - get_tree().change_scene_to_file("res://UI/Start.tscn") - ) + add_to_players.rpc_id(id, inst_to_dict(Client.player)) + # TODO: check why bug and adds more players than intended + #ask_game_running.rpc_id(id) + #is_game_running.connect(func(is_running: bool): + #if not is_running: + #add_to_players.rpc_id(id, inst_to_dict(Client.player)) + #elif is_running: + #get_tree().change_scene_to_file("res://UI/Start.tscn") + #) func _on_peer_disconnected(id: int): print(multiplayer.get_unique_id(), ": peer disconnected: ", id) -- cgit v1.2.3