|
|
@ -15,13 +15,13 @@ func _on_host_pressed(): |
|
|
|
var port = find_node("port").get_value() |
|
|
|
var bots = find_node("bots").is_pressed() |
|
|
|
var err = server.host_game(int(port), bots) |
|
|
|
|
|
|
|
|
|
|
|
if err == OK: |
|
|
|
var lobby_menu = LobbyMenu.instance() |
|
|
|
get_tree().get_root().add_child(lobby_menu) |
|
|
|
|
|
|
|
|
|
|
|
gamestate.set_player(get_tree().get_network_unique_id()) |
|
|
|
|
|
|
|
|
|
|
|
queue_free() |
|
|
|
else: |
|
|
|
_on_back_pressed() |
|
|
@ -30,4 +30,4 @@ func _on_host_pressed(): |
|
|
|
|
|
|
|
func _on_back_pressed(): |
|
|
|
queue_free() |
|
|
|
get_tree().get_root().get_node("multiplayer_menu").show() |
|
|
|
get_tree().get_root().get_node("multiplayer_menu").show() |