mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Move server files into their subfolders
This commit is contained in:
parent
d705613db3
commit
3d1c9fd5de
393 changed files with 600 additions and 579 deletions
|
|
@ -39,9 +39,9 @@
|
|||
#include "core/templates/local_vector.h"
|
||||
#include "core/templates/rid.h"
|
||||
#include "core/templates/rid_owner.h"
|
||||
#include "servers/navigation/navigation_path_query_parameters_2d.h"
|
||||
#include "servers/navigation/navigation_path_query_result_2d.h"
|
||||
#include "servers/navigation_server_2d.h"
|
||||
#include "servers/navigation_2d/navigation_path_query_parameters_2d.h"
|
||||
#include "servers/navigation_2d/navigation_path_query_result_2d.h"
|
||||
#include "servers/navigation_2d/navigation_server_2d.h"
|
||||
|
||||
/// The commands are functions executed during the `sync` phase.
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "../nav_utils_2d.h"
|
||||
|
||||
#include "core/object/ref_counted.h"
|
||||
#include "servers/navigation/navigation_utilities.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
|
||||
class NavBaseIteration2D : public RefCounted {
|
||||
GDCLASS(NavBaseIteration2D, RefCounted);
|
||||
|
|
@ -43,7 +43,7 @@ public:
|
|||
uint32_t navigation_layers = 1;
|
||||
real_t enter_cost = 0.0;
|
||||
real_t travel_cost = 1.0;
|
||||
NavigationUtilities::PathSegmentType owner_type;
|
||||
NavigationEnums2D::PathSegmentType owner_type;
|
||||
ObjectID owner_object_id;
|
||||
RID owner_rid;
|
||||
bool owner_use_edge_connections = false;
|
||||
|
|
@ -51,7 +51,7 @@ public:
|
|||
LocalVector<LocalVector<Nav2D::Connection>> internal_connections;
|
||||
|
||||
bool get_enabled() const { return enabled; }
|
||||
NavigationUtilities::PathSegmentType get_type() const { return owner_type; }
|
||||
NavigationEnums2D::PathSegmentType get_type() const { return owner_type; }
|
||||
RID get_self() const { return owner_rid; }
|
||||
ObjectID get_owner_id() const { return owner_object_id; }
|
||||
uint32_t get_navigation_layers() const { return navigation_layers; }
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include "core/object/class_db.h"
|
||||
#include "core/object/worker_thread_pool.h"
|
||||
#include "core/templates/rid_owner.h"
|
||||
#include "servers/navigation_server_2d.h"
|
||||
#include "servers/navigation_2d/navigation_server_2d.h"
|
||||
|
||||
class Node;
|
||||
class NavigationPolygon;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "nav_region_iteration_2d.h"
|
||||
|
||||
#include "core/math/geometry_2d.h"
|
||||
#include "servers/navigation/navigation_utilities.h"
|
||||
|
||||
using namespace Nav2D;
|
||||
|
||||
|
|
@ -151,7 +150,7 @@ void NavMeshQueries2D::map_query_path(NavMap2D *p_map, const Ref<NavigationPathQ
|
|||
ERR_FAIL_COND(p_query_parameters.is_null());
|
||||
ERR_FAIL_COND(p_query_result.is_null());
|
||||
|
||||
using namespace NavigationUtilities;
|
||||
using namespace NavigationDefaults2D;
|
||||
|
||||
NavMeshQueries2D::NavMeshPathQueryTask2D query_task;
|
||||
query_task.start_position = p_query_parameters->get_start_position();
|
||||
|
|
@ -1156,7 +1155,7 @@ bool NavMeshQueries2D::_query_task_is_connection_owner_usable(const NavMeshPathQ
|
|||
|
||||
if (p_query_task.exclude_regions || p_query_task.include_regions) {
|
||||
switch (p_owner->get_type()) {
|
||||
case NavigationUtilities::PathSegmentType::PATH_SEGMENT_TYPE_REGION: {
|
||||
case NavigationEnums2D::PathSegmentType::PATH_SEGMENT_TYPE_REGION: {
|
||||
if (p_query_task.exclude_regions && p_query_task.excluded_regions.has(p_owner->get_self())) {
|
||||
// Not usable. Exclude region filter is active and this region is excluded.
|
||||
owner_usable = false;
|
||||
|
|
@ -1165,7 +1164,7 @@ bool NavMeshQueries2D::_query_task_is_connection_owner_usable(const NavMeshPathQ
|
|||
owner_usable = false;
|
||||
}
|
||||
} break;
|
||||
case NavigationUtilities::PathSegmentType::PATH_SEGMENT_TYPE_LINK: {
|
||||
case NavigationEnums2D::PathSegmentType::PATH_SEGMENT_TYPE_LINK: {
|
||||
const LocalVector<Polygon> &link_polygons = p_owner->get_navmesh_polygons();
|
||||
if (link_polygons.size() != 2) {
|
||||
// Not usable. Whatever this is, it is not a valid connected link.
|
||||
|
|
|
|||
|
|
@ -34,12 +34,13 @@
|
|||
|
||||
#include "core/templates/a_hash_map.h"
|
||||
|
||||
#include "servers/navigation/navigation_globals.h"
|
||||
#include "servers/navigation/navigation_path_query_parameters_2d.h"
|
||||
#include "servers/navigation/navigation_path_query_result_2d.h"
|
||||
#include "servers/navigation/navigation_utilities.h"
|
||||
#include "servers/nav_heap.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
#include "servers/navigation_2d/navigation_path_query_parameters_2d.h"
|
||||
#include "servers/navigation_2d/navigation_path_query_result_2d.h"
|
||||
|
||||
using namespace NavigationUtilities;
|
||||
using namespace NavigationDefaults2D;
|
||||
using namespace NavigationEnums2D;
|
||||
|
||||
class NavMap2D;
|
||||
struct NavMapIteration2D;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/templates/self_list.h"
|
||||
#include "servers/navigation/navigation_globals.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
|
||||
#include <Agent2d.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "nav_rid_2d.h"
|
||||
#include "nav_utils_2d.h"
|
||||
|
||||
#include "servers/navigation/navigation_utilities.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
|
||||
class NavMap2D;
|
||||
|
||||
|
|
@ -43,10 +43,10 @@ protected:
|
|||
real_t enter_cost = 0.0;
|
||||
real_t travel_cost = 1.0;
|
||||
ObjectID owner_id;
|
||||
NavigationUtilities::PathSegmentType type;
|
||||
NavigationEnums2D::PathSegmentType type;
|
||||
|
||||
public:
|
||||
NavigationUtilities::PathSegmentType get_type() const { return type; }
|
||||
NavigationEnums2D::PathSegmentType get_type() const { return type; }
|
||||
|
||||
virtual void set_use_edge_connections(bool p_enabled) {}
|
||||
virtual bool get_use_edge_connections() const { return false; }
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ Ref<NavLinkIteration2D> NavLink2D::get_iteration() {
|
|||
|
||||
NavLink2D::NavLink2D() :
|
||||
sync_dirty_request_list_element(this) {
|
||||
type = NavigationUtilities::PathSegmentType::PATH_SEGMENT_TYPE_LINK;
|
||||
type = NavigationEnums2D::PathSegmentType::PATH_SEGMENT_TYPE_LINK;
|
||||
iteration.instantiate();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/object/worker_thread_pool.h"
|
||||
#include "servers/navigation_server_2d.h"
|
||||
#include "servers/navigation_2d/navigation_server_2d.h"
|
||||
|
||||
#include <Obstacle2d.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "core/math/math_defs.h"
|
||||
#include "core/object/worker_thread_pool.h"
|
||||
#include "servers/navigation/navigation_globals.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
|
||||
#include <KdTree2d.h>
|
||||
#include <RVOSimulator2d.h>
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ bool NavRegion2D::get_use_async_iterations() const {
|
|||
|
||||
NavRegion2D::NavRegion2D() :
|
||||
sync_dirty_request_list_element(this), async_list_element(this) {
|
||||
type = NavigationUtilities::PathSegmentType::PATH_SEGMENT_TYPE_REGION;
|
||||
type = NavigationEnums2D::PathSegmentType::PATH_SEGMENT_TYPE_REGION;
|
||||
iteration_build.region = this;
|
||||
iteration.instantiate();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
#include "core/object/ref_counted.h"
|
||||
#include "core/templates/hash_map.h"
|
||||
#include "core/templates/hashfuncs.h"
|
||||
#include "servers/navigation/nav_heap.h"
|
||||
#include "servers/navigation/navigation_utilities.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "servers/navigation_2d/navigation_constants_2d.h"
|
||||
|
||||
class NavBaseIteration2D;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "2d/godot_navigation_server_2d.h"
|
||||
|
||||
#include "core/config/engine.h"
|
||||
#include "servers/navigation_server_2d.h"
|
||||
#include "servers/navigation_2d/navigation_server_2d.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/navigation_link_2d_editor_plugin.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue