summaryrefslogtreecommitdiff
path: root/Game/Network.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-12-21 14:15:11 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-12-21 14:15:11 +0100
commit5b35174ffab42f0331f1a6527ef6bbab7a3dbdcb (patch)
tree071530353b02f45fffc26aa4b0f43f7b901b3046 /Game/Network.gd
parenta854a1862a30632e49520f6e1e11333d5c8ff241 (diff)
next commitHEADmain
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)