forked from unfa/liblast
Fixed character selection bug
This commit is contained in:
parent
0e0d54180c
commit
6622d27977
2 changed files with 3 additions and 4 deletions
5
Game.gd
5
Game.gd
|
@ -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):
|
||||
|
|
|
@ -4,3 +4,5 @@
|
|||
|
||||
[node name="Game" instance=ExtResource( 2 )]
|
||||
auto_host = true
|
||||
|
||||
[editable path="MenuContainer/CharacterSelectScreen"]
|
||||
|
|
Loading…
Reference in a new issue