Fixed character selection bug

This commit is contained in:
desktop 2021-02-26 23:25:41 +01:00
parent 0e0d54180c
commit 6622d27977
2 changed files with 3 additions and 4 deletions

View file

@ -40,8 +40,6 @@ func set_local_player(player):
var player_data = get_player_data()
print(player_data)
rpc("set_player_data", player_data)
player.hide()
@ -262,6 +260,7 @@ func get_player_data():
func get_character_scene(character_name):
var path = "res://Assets/Characters/" + character_name + "/" + character_name + ".tscn"
var packed_character = load(path)
return packed_character
remote func check_players(player_data):
for player_name in player_data:
@ -319,8 +318,6 @@ master func set_player_data(player_data):
check_players(player_data)
var new_player_data = get_player_data()
print(new_player_data)
rpc("check_players", new_player_data)
func on_peer_disconnected(id):

View file

@ -4,3 +4,5 @@
[node name="Game" instance=ExtResource( 2 )]
auto_host = true
[editable path="MenuContainer/CharacterSelectScreen"]