summaryrefslogtreecommitdiff
path: root/Game/Network.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Network.gd')
-rw-r--r--Game/Network.gd16
1 files changed, 9 insertions, 7 deletions
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)