diff --git a/scripts/menus/direct_host_menu.gd b/scripts/menus/direct_host_menu.gd index 71470fd..1b6b73d 100644 --- a/scripts/menus/direct_host_menu.gd +++ b/scripts/menus/direct_host_menu.gd @@ -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() \ No newline at end of file diff --git a/scripts/menus/direct_join_menu.gd b/scripts/menus/direct_join_menu.gd index 0845629..5837173 100644 --- a/scripts/menus/direct_join_menu.gd +++ b/scripts/menus/direct_join_menu.gd @@ -6,8 +6,8 @@ func _draw(): func _on_join_pressed(): - var ip = find_node("ip").text - var port = find_node("port").get_value() + var ip = find_node("ip").text + var port = find_node("port").get_value() client.join_game(ip, int(port)) queue_free() diff --git a/scripts/menus/ingame_menu.gd b/scripts/menus/ingame_menu.gd index 6dd1df6..5acad31 100644 --- a/scripts/menus/ingame_menu.gd +++ b/scripts/menus/ingame_menu.gd @@ -1,5 +1,6 @@ extends Control + func _draw(): find_node("resume").grab_focus() diff --git a/scripts/player/human_inventory.gd b/scripts/player/human_inventory.gd index 873c725..ed9483e 100644 --- a/scripts/player/human_inventory.gd +++ b/scripts/player/human_inventory.gd @@ -56,7 +56,7 @@ func _on_item_changed(road_identifier, player): if is_network_master(): if view.get_child_count() > 0: view.remove_child(view.get_child(0)) - + view.add_child(item) - + get_node("../hud/inventory/track_container/type").set_text(tr(road_identifier)) \ No newline at end of file diff --git a/scripts/road/road.gd b/scripts/road/road.gd index 1860c00..ccdae3e 100644 --- a/scripts/road/road.gd +++ b/scripts/road/road.gd @@ -110,7 +110,7 @@ func get_force_penalty(index:int): return force_penalties[index].rotated(get_rotation().normalized(), get_rotation().length()) else: return force_penalties[index] - + return Vector3(0,0,0) @@ -118,9 +118,9 @@ func get_path_penalty(index:int): if index >= 0: if path_penalties.size() < (index + 1): return get_path_penalty(index - 1) - + return path_penalties[index] - + return 0.0