From dbcc6e33da84509721aa9e1a565dc02e73750c01 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 10 Dec 2023 19:36:00 +0100 Subject: [PATCH] Moved the physics server to core. --- core/register_core_types.cpp | 3 +++ core/servers/SCsub | 1 + {servers => core/servers/physics}/physics_server.cpp | 0 {servers => core/servers/physics}/physics_server.h | 0 editor/editor_node.cpp | 2 +- editor/plugins/spatial_editor_plugin.cpp | 2 +- editor/project_manager.cpp | 2 +- main/main.cpp | 2 +- main/performance.cpp | 2 +- main/tests/test_physics.cpp | 2 +- modules/csg/csg_shape.cpp | 2 +- modules/props/prop_instance_prop_job.cpp | 2 +- modules/props/props/prop_data.cpp | 2 +- modules/props/tiled_wall/tiled_wall.cpp | 2 +- modules/props/tiled_wall/tiled_wall_data.cpp | 2 +- modules/props_2d/prop_2d_instance_merger.cpp | 2 +- modules/props_2d/props/prop_2d_data.cpp | 2 +- modules/props_2d/tiled_wall/tiled_wall_2d_data.cpp | 2 +- modules/skeleton_3d/nodes/physical_bone.h | 2 +- .../resources/skeleton_modification_3d_jiggle.cpp | 2 +- modules/terraman/world/default/terrain_chunk_default.cpp | 2 +- modules/terraman/world/default/terrain_world_default.cpp | 2 +- modules/terraman/world/jobs/terrain_prop_job.cpp | 2 +- modules/terraman/world/jobs/terrain_terrain_job.cpp | 2 +- modules/terraman/world/terrain_chunk.cpp | 2 +- modules/terraman/world/terrain_world_editor.cpp | 2 +- .../terraman_2d/world/default/terrain_2d_chunk_default.cpp | 2 +- modules/voxelman/world/default/voxel_chunk_default.cpp | 2 +- modules/voxelman/world/jobs/voxel_prop_job.cpp | 2 +- modules/voxelman/world/jobs/voxel_terrain_job.cpp | 2 +- modules/voxelman/world/voxel_chunk.cpp | 2 +- modules/voxelman/world/voxel_world_editor.cpp | 2 +- scene/3d/area.cpp | 2 +- scene/3d/audio_stream_player_3d.cpp | 2 +- scene/3d/collision_object.cpp | 2 +- scene/3d/physics_body.h | 2 +- scene/3d/physics_joint.h | 2 +- scene/3d/ray_cast.cpp | 2 +- scene/3d/shape_cast.h | 2 +- scene/3d/soft_body.cpp | 2 +- scene/3d/spring_arm.cpp | 2 +- scene/main/scene_tree.cpp | 2 +- scene/resources/physics_material.h | 2 +- scene/resources/shapes/box_shape.cpp | 2 +- scene/resources/shapes/capsule_shape.cpp | 2 +- scene/resources/shapes/concave_polygon_shape.cpp | 2 +- scene/resources/shapes/convex_polygon_shape.cpp | 2 +- scene/resources/shapes/cylinder_shape.cpp | 2 +- scene/resources/shapes/height_map_shape.cpp | 2 +- scene/resources/shapes/plane_shape.cpp | 2 +- scene/resources/shapes/ray_shape.cpp | 2 +- scene/resources/shapes/shape.cpp | 2 +- scene/resources/shapes/sphere_shape.cpp | 2 +- scene/resources/world_3d.h | 2 +- servers/physics/area_sw.h | 2 +- servers/physics/collision_object_sw.h | 2 +- servers/physics/physics_server_sw.h | 2 +- servers/physics/shape_sw.h | 2 +- servers/register_server_types.cpp | 5 ++--- 59 files changed, 60 insertions(+), 57 deletions(-) rename {servers => core/servers/physics}/physics_server.cpp (100%) rename {servers => core/servers/physics}/physics_server.h (100%) diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index c8da522a6..d1e920262 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -81,6 +81,7 @@ #include "core/log/logger_backend.h" #include "core/servers/rendering/rendering_server.h" +#include "core/servers/physics/physics_server.h" static Ref resource_saver_binary; static Ref resource_loader_binary; @@ -300,6 +301,7 @@ void register_core_singletons() { ClassDB::register_class(); ClassDB::register_class<_ScriptServer>(); ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); Engine::get_singleton()->add_singleton(Engine::Singleton("ProjectSettings", ProjectSettings::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("IP", IP::get_singleton())); @@ -319,6 +321,7 @@ void register_core_singletons() { Engine::get_singleton()->add_singleton(Engine::Singleton("ThreadPool", ThreadPool::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("ScriptServer", _ScriptServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton())); + Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer", PhysicsServer::get_singleton())); } void unregister_core_types() { diff --git a/core/servers/SCsub b/core/servers/SCsub index 7ff531135..5e783795e 100644 --- a/core/servers/SCsub +++ b/core/servers/SCsub @@ -3,4 +3,5 @@ Import("env") env.add_source_files(env.core_sources, "rendering/*.cpp") +env.add_source_files(env.core_sources, "physics/*.cpp") #env.add_source_files(env.core_sources, "*.cpp") diff --git a/servers/physics_server.cpp b/core/servers/physics/physics_server.cpp similarity index 100% rename from servers/physics_server.cpp rename to core/servers/physics/physics_server.cpp diff --git a/servers/physics_server.h b/core/servers/physics/physics_server.h similarity index 100% rename from servers/physics_server.h rename to core/servers/physics/physics_server.h diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c06c4ded2..e67c7a6e5 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -189,7 +189,7 @@ #include "scene/resources/world_3d.h" #include "servers/navigation_server.h" #include "servers/physics_2d_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" #include "modules/modules_enabled.gen.h" diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 93551d6bb..7044376b5 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -97,7 +97,7 @@ #include "scene/resources/style_box.h" #include "scene/resources/mesh/surface_tool.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 2be08c154..d7f76ef0c 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -86,7 +86,7 @@ #include "scene/resources/texture.h" #include "servers/navigation_server.h" #include "servers/physics_2d_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "thirdparty/minizip/ioapi.h" #include "thirdparty/minizip/unzip.h" diff --git a/main/main.cpp b/main/main.cpp index 2c288994d..43c7233ce 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -68,7 +68,7 @@ #include "servers/navigation_2d_server.h" #include "servers/navigation_server.h" #include "servers/physics_2d_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "servers/register_server_types.h" #include "core/servers/rendering/rendering_server_callbacks.h" diff --git a/main/performance.cpp b/main/performance.cpp index 8bbe8a3a1..22f9558f7 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -37,7 +37,7 @@ #include "servers/audio_server.h" #include "servers/navigation_server.h" #include "servers/physics_2d_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" Performance *Performance::singleton = nullptr; diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp index 5c1e63b7c..deb3170f6 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics.cpp @@ -36,7 +36,7 @@ #include "core/os/main_loop.h" #include "core/os/os.h" #include "core/string/print_string.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" class TestPhysicsMainLoop : public MainLoop { diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 4aef660d8..cb5740191 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -30,7 +30,7 @@ #include "csg_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "scene/resources/world_3d.h" #include "scene/resources/mesh/mesh.h" diff --git a/modules/props/prop_instance_prop_job.cpp b/modules/props/prop_instance_prop_job.cpp index da973fafd..383972077 100644 --- a/modules/props/prop_instance_prop_job.cpp +++ b/modules/props/prop_instance_prop_job.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include "prop_mesher.h" #include "scene/resources/shapes/shape.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "singleton/prop_cache.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/props/props/prop_data.cpp b/modules/props/props/prop_data.cpp index f9e52a5eb..78b696f5c 100644 --- a/modules/props/props/prop_data.cpp +++ b/modules/props/props/prop_data.cpp @@ -26,7 +26,7 @@ SOFTWARE. #include "prop_data_light.h" #include "prop_data_prop.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/props/tiled_wall/tiled_wall.cpp b/modules/props/tiled_wall/tiled_wall.cpp index fce3aa866..c8550d5ed 100644 --- a/modules/props/tiled_wall/tiled_wall.cpp +++ b/modules/props/tiled_wall/tiled_wall.cpp @@ -16,7 +16,7 @@ #include "core/core_string_names.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "tiled_wall_data.h" int TiledWall::get_width() const { diff --git a/modules/props/tiled_wall/tiled_wall_data.cpp b/modules/props/tiled_wall/tiled_wall_data.cpp index b773248d5..e085fe81b 100644 --- a/modules/props/tiled_wall/tiled_wall_data.cpp +++ b/modules/props/tiled_wall/tiled_wall_data.cpp @@ -22,7 +22,7 @@ SOFTWARE. #include "tiled_wall_data.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #define VARIANT_ARRAY_GET(arr) \ Vector r; \ diff --git a/modules/props_2d/prop_2d_instance_merger.cpp b/modules/props_2d/prop_2d_instance_merger.cpp index f6f48f3cf..08f00ffed 100644 --- a/modules/props_2d/prop_2d_instance_merger.cpp +++ b/modules/props_2d/prop_2d_instance_merger.cpp @@ -4,7 +4,7 @@ //#include "../thread_pool/thread_pool.h" #include "scene/resources/world_2d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/config/engine.h" diff --git a/modules/props_2d/props/prop_2d_data.cpp b/modules/props_2d/props/prop_2d_data.cpp index 410800967..a1523ad79 100644 --- a/modules/props_2d/props/prop_2d_data.cpp +++ b/modules/props_2d/props/prop_2d_data.cpp @@ -26,7 +26,7 @@ SOFTWARE. #include "prop_2d_data_light.h" #include "prop_2d_data_prop.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/props_2d/tiled_wall/tiled_wall_2d_data.cpp b/modules/props_2d/tiled_wall/tiled_wall_2d_data.cpp index de2609742..1efcb80c4 100644 --- a/modules/props_2d/tiled_wall/tiled_wall_2d_data.cpp +++ b/modules/props_2d/tiled_wall/tiled_wall_2d_data.cpp @@ -22,7 +22,7 @@ SOFTWARE. #include "tiled_wall_2d_data.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #define VARIANT_ARRAY_GET(arr) \ Vector r; \ diff --git a/modules/skeleton_3d/nodes/physical_bone.h b/modules/skeleton_3d/nodes/physical_bone.h index 9c6755faa..adfcc0f14 100644 --- a/modules/skeleton_3d/nodes/physical_bone.h +++ b/modules/skeleton_3d/nodes/physical_bone.h @@ -34,7 +34,7 @@ #include "core/object/reference.h" #include "core/containers/vset.h" #include "scene/3d/collision_object.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "scene/3d/physics_body.h" class PhysicsMaterial; diff --git a/modules/skeleton_3d/resources/skeleton_modification_3d_jiggle.cpp b/modules/skeleton_3d/resources/skeleton_modification_3d_jiggle.cpp index 642bacc5d..21e3a983d 100644 --- a/modules/skeleton_3d/resources/skeleton_modification_3d_jiggle.cpp +++ b/modules/skeleton_3d/resources/skeleton_modification_3d_jiggle.cpp @@ -31,7 +31,7 @@ #include "skeleton_modification_3d_jiggle.h" #include "../nodes/skeleton.h" #include "skeleton_modification_stack_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "scene/resources/world_3d.h" bool SkeletonModification3DJiggle::_set(const StringName &p_path, const Variant &p_value) { diff --git a/modules/terraman/world/default/terrain_chunk_default.cpp b/modules/terraman/world/default/terrain_chunk_default.cpp index 1bdce2402..41d1d0915 100644 --- a/modules/terraman/world/default/terrain_chunk_default.cpp +++ b/modules/terraman/world/default/terrain_chunk_default.cpp @@ -24,7 +24,7 @@ SOFTWARE. #include "../../defines.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" #include "../../../opensimplex/open_simplex_noise.h" diff --git a/modules/terraman/world/default/terrain_world_default.cpp b/modules/terraman/world/default/terrain_world_default.cpp index 40fdb896a..e26c05abf 100644 --- a/modules/terraman/world/default/terrain_world_default.cpp +++ b/modules/terraman/world/default/terrain_world_default.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include "../jobs/terrain_light_job.h" #include "../jobs/terrain_prop_job.h" #include "../jobs/terrain_terrain_job.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" _FORCE_INLINE_ int TerrainWorldDefault::get_build_flags() const { return _build_flags; diff --git a/modules/terraman/world/jobs/terrain_prop_job.cpp b/modules/terraman/world/jobs/terrain_prop_job.cpp index 119f40bce..4536bb951 100644 --- a/modules/terraman/world/jobs/terrain_prop_job.cpp +++ b/modules/terraman/world/jobs/terrain_prop_job.cpp @@ -32,7 +32,7 @@ SOFTWARE. #include "../../meshers/terrain_mesher.h" #include "../default/terrain_chunk_default.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/terraman/world/jobs/terrain_terrain_job.cpp b/modules/terraman/world/jobs/terrain_terrain_job.cpp index 91d30fde2..c55a48b4e 100644 --- a/modules/terraman/world/jobs/terrain_terrain_job.cpp +++ b/modules/terraman/world/jobs/terrain_terrain_job.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include "../../meshers/terrain_mesher.h" #include "../default/terrain_chunk_default.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/terraman/world/terrain_chunk.cpp b/modules/terraman/world/terrain_chunk.cpp index 3bc88e7da..1d595d5da 100644 --- a/modules/terraman/world/terrain_chunk.cpp +++ b/modules/terraman/world/terrain_chunk.cpp @@ -28,7 +28,7 @@ SOFTWARE. #include "core/object/message_queue.h" #include "jobs/terrain_job.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "terrain_structure.h" #include "core/os/thread_pool.h" diff --git a/modules/terraman/world/terrain_world_editor.cpp b/modules/terraman/world/terrain_world_editor.cpp index 8613698c1..d16730bbf 100644 --- a/modules/terraman/world/terrain_world_editor.cpp +++ b/modules/terraman/world/terrain_world_editor.cpp @@ -34,7 +34,7 @@ SOFTWARE. #include "../library/terrain_library.h" #include "../library/terrain_surface.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "../defines.h" diff --git a/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp b/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp index 2af835be7..4368f82b1 100644 --- a/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp +++ b/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp @@ -24,7 +24,7 @@ SOFTWARE. #include "../../defines.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" #include "../../../opensimplex/open_simplex_noise.h" diff --git a/modules/voxelman/world/default/voxel_chunk_default.cpp b/modules/voxelman/world/default/voxel_chunk_default.cpp index 7f57f4192..3c214424d 100644 --- a/modules/voxelman/world/default/voxel_chunk_default.cpp +++ b/modules/voxelman/world/default/voxel_chunk_default.cpp @@ -24,7 +24,7 @@ SOFTWARE. #include "../../defines.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" #include "../../../opensimplex/open_simplex_noise.h" diff --git a/modules/voxelman/world/jobs/voxel_prop_job.cpp b/modules/voxelman/world/jobs/voxel_prop_job.cpp index 02c1eb1a8..446bd436e 100644 --- a/modules/voxelman/world/jobs/voxel_prop_job.cpp +++ b/modules/voxelman/world/jobs/voxel_prop_job.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include "../../library/voxel_material_cache.h" #include "../default/voxel_chunk_default.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/voxelman/world/jobs/voxel_terrain_job.cpp b/modules/voxelman/world/jobs/voxel_terrain_job.cpp index 5f10b2dae..4559a6d94 100644 --- a/modules/voxelman/world/jobs/voxel_terrain_job.cpp +++ b/modules/voxelman/world/jobs/voxel_terrain_job.cpp @@ -30,7 +30,7 @@ SOFTWARE. #include "../../library/voxel_material_cache.h" #include "../default/voxel_chunk_default.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/voxelman/world/voxel_chunk.cpp b/modules/voxelman/world/voxel_chunk.cpp index 6d4377150..dd46f13e3 100644 --- a/modules/voxelman/world/voxel_chunk.cpp +++ b/modules/voxelman/world/voxel_chunk.cpp @@ -27,7 +27,7 @@ SOFTWARE. #include "../defines.h" #include "jobs/voxel_job.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "voxel_structure.h" #include "core/os/thread_pool.h" diff --git a/modules/voxelman/world/voxel_world_editor.cpp b/modules/voxelman/world/voxel_world_editor.cpp index 3249230f5..2ab5dd2e9 100644 --- a/modules/voxelman/world/voxel_world_editor.cpp +++ b/modules/voxelman/world/voxel_world_editor.cpp @@ -34,7 +34,7 @@ SOFTWARE. #include "../library/voxel_library.h" #include "../library/voxel_surface.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "../defines.h" diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index c594b74cf..c483dccd8 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -32,7 +32,7 @@ #include "scene/resources/shapes/shape.h" #include "scene/main/scene_string_names.h" #include "servers/audio_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" void Area::set_space_override_mode(SpaceOverride p_mode) { space_override = p_mode; diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 1f643c4a4..fa7052be4 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -39,7 +39,7 @@ #include "scene/resources/shapes/shape.h" #include "scene/resources/world_3d.h" #include "servers/audio/audio_stream.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" // Based on "A Novel Multichannel Panning Method for Standard and Arbitrary Loudspeaker Configurations" by Ramy Sadek and Chris Kyriakakis (2004) // Speaker-Placement Correction Amplitude Panning (SPCAP) diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 086c86ae4..e205bcb3b 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -35,7 +35,7 @@ #include "scene/resources/mesh/mesh.h" #include "scene/resources/world_3d.h" #include "scene/main/scene_string_names.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" void CollisionObject::_notification(int p_what) { switch (p_what) { diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h index 95faf8664..f59aefe6d 100644 --- a/scene/3d/physics_body.h +++ b/scene/3d/physics_body.h @@ -33,7 +33,7 @@ #include "core/containers/vset.h" #include "core/object/reference.h" #include "scene/3d/collision_object.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" class PhysicsMaterial; class Skeleton; diff --git a/scene/3d/physics_joint.h b/scene/3d/physics_joint.h index 45b931861..5e2f208b7 100644 --- a/scene/3d/physics_joint.h +++ b/scene/3d/physics_joint.h @@ -31,7 +31,7 @@ /*************************************************************************/ #include "scene/main/spatial.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" class PhysicsBody; diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index 248bbe438..97a14ef74 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -36,7 +36,7 @@ #include "scene/resources/material/material.h" #include "scene/resources/mesh/mesh.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" void RayCast::set_cast_to(const Vector3 &p_point) { cast_to = p_point; diff --git a/scene/3d/shape_cast.h b/scene/3d/shape_cast.h index 1407eeffa..d68380b4c 100644 --- a/scene/3d/shape_cast.h +++ b/scene/3d/shape_cast.h @@ -35,7 +35,7 @@ #include "scene/main/spatial.h" #include "scene/resources/shapes/shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" class SpatialMaterial; diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index c35ee9acb..94c736b16 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -37,7 +37,7 @@ #include "scene/3d/physics_body.h" #include "scene/resources/mesh/mesh.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" SoftBodyRenderingServerHandler::SoftBodyRenderingServerHandler() {} diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp index b04edc350..c63de45b8 100644 --- a/scene/3d/spring_arm.cpp +++ b/scene/3d/spring_arm.cpp @@ -34,7 +34,7 @@ #include "scene/resources/shapes/shape.h" #include "scene/resources/shapes/sphere_shape.h" #include "scene/resources/world_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" SpringArm::SpringArm() : spring_length(1), diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 114b7fab2..cd3124602 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -54,7 +54,7 @@ #include "servers/audio_server.h" #include "servers/navigation_server.h" #include "servers/physics_2d_server.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "viewport.h" #include "modules/modules_enabled.gen.h" // For freetype. diff --git a/scene/resources/physics_material.h b/scene/resources/physics_material.h index 3626b6a5b..f8e9d050b 100644 --- a/scene/resources/physics_material.h +++ b/scene/resources/physics_material.h @@ -31,7 +31,7 @@ /*************************************************************************/ #include "core/object/resource.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" class PhysicsMaterial : public Resource { GDCLASS(PhysicsMaterial, Resource); diff --git a/scene/resources/shapes/box_shape.cpp b/scene/resources/shapes/box_shape.cpp index bd050ceae..2ddd2b5ff 100644 --- a/scene/resources/shapes/box_shape.cpp +++ b/scene/resources/shapes/box_shape.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "box_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector BoxShape::get_debug_mesh_lines() { Vector lines; diff --git a/scene/resources/shapes/capsule_shape.cpp b/scene/resources/shapes/capsule_shape.cpp index ef3dda302..1595e30a4 100644 --- a/scene/resources/shapes/capsule_shape.cpp +++ b/scene/resources/shapes/capsule_shape.cpp @@ -30,7 +30,7 @@ #include "capsule_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector CapsuleShape::get_debug_mesh_lines() { float radius = get_radius(); diff --git a/scene/resources/shapes/concave_polygon_shape.cpp b/scene/resources/shapes/concave_polygon_shape.cpp index fab953446..081ace689 100644 --- a/scene/resources/shapes/concave_polygon_shape.cpp +++ b/scene/resources/shapes/concave_polygon_shape.cpp @@ -30,7 +30,7 @@ #include "concave_polygon_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector ConcavePolygonShape::get_debug_mesh_lines() { RBSet edges; diff --git a/scene/resources/shapes/convex_polygon_shape.cpp b/scene/resources/shapes/convex_polygon_shape.cpp index 7bb85210b..17775f0d3 100644 --- a/scene/resources/shapes/convex_polygon_shape.cpp +++ b/scene/resources/shapes/convex_polygon_shape.cpp @@ -30,7 +30,7 @@ #include "convex_polygon_shape.h" #include "core/math/convex_hull.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector ConvexPolygonShape::get_debug_mesh_lines() { PoolVector points = get_points(); diff --git a/scene/resources/shapes/cylinder_shape.cpp b/scene/resources/shapes/cylinder_shape.cpp index 45a05ab12..581dbb284 100644 --- a/scene/resources/shapes/cylinder_shape.cpp +++ b/scene/resources/shapes/cylinder_shape.cpp @@ -30,7 +30,7 @@ #include "cylinder_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector CylinderShape::get_debug_mesh_lines() { float radius = get_radius(); diff --git a/scene/resources/shapes/height_map_shape.cpp b/scene/resources/shapes/height_map_shape.cpp index 6b3f25b5f..111f7898a 100644 --- a/scene/resources/shapes/height_map_shape.cpp +++ b/scene/resources/shapes/height_map_shape.cpp @@ -30,7 +30,7 @@ #include "height_map_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector HeightMapShape::get_debug_mesh_lines() { Vector points; diff --git a/scene/resources/shapes/plane_shape.cpp b/scene/resources/shapes/plane_shape.cpp index b0d0740d9..f693666ce 100644 --- a/scene/resources/shapes/plane_shape.cpp +++ b/scene/resources/shapes/plane_shape.cpp @@ -30,7 +30,7 @@ #include "plane_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector PlaneShape::get_debug_mesh_lines() { Plane p = get_plane(); diff --git a/scene/resources/shapes/ray_shape.cpp b/scene/resources/shapes/ray_shape.cpp index 965a5e0c0..a6694f1ae 100644 --- a/scene/resources/shapes/ray_shape.cpp +++ b/scene/resources/shapes/ray_shape.cpp @@ -30,7 +30,7 @@ #include "ray_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector RayShape::get_debug_mesh_lines() { Vector points; diff --git a/scene/resources/shapes/shape.cpp b/scene/resources/shapes/shape.cpp index 761dc1b65..6834b232e 100644 --- a/scene/resources/shapes/shape.cpp +++ b/scene/resources/shapes/shape.cpp @@ -33,7 +33,7 @@ #include "core/os/os.h" #include "scene/main/scene_tree.h" #include "scene/resources/mesh/mesh.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" void Shape::add_vertices_to_array(PoolVector &array, const Transform &p_xform) { Vector toadd = get_debug_mesh_lines(); diff --git a/scene/resources/shapes/sphere_shape.cpp b/scene/resources/shapes/sphere_shape.cpp index e2f9ba1a1..0ef3d396b 100644 --- a/scene/resources/shapes/sphere_shape.cpp +++ b/scene/resources/shapes/sphere_shape.cpp @@ -30,7 +30,7 @@ #include "sphere_shape.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" Vector SphereShape::get_debug_mesh_lines() { float r = get_radius(); diff --git a/scene/resources/world_3d.h b/scene/resources/world_3d.h index dd9f7b67f..cce942cc7 100644 --- a/scene/resources/world_3d.h +++ b/scene/resources/world_3d.h @@ -33,7 +33,7 @@ #include "core/object/resource.h" #include "scene/resources/environment_3d.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "core/servers/rendering/rendering_server.h" class Camera; diff --git a/servers/physics/area_sw.h b/servers/physics/area_sw.h index 4f9973ed0..0a083a8e9 100644 --- a/servers/physics/area_sw.h +++ b/servers/physics/area_sw.h @@ -32,7 +32,7 @@ #include "collision_object_sw.h" #include "core/containers/self_list.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" //#include "servers/physics/query_sw.h" class SpaceSW; diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index 90244af64..a692eac5f 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -32,7 +32,7 @@ #include "broad_phase_sw.h" #include "core/containers/self_list.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "shape_sw.h" #ifdef DEBUG_ENABLED diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h index 20cf5ac45..b971089f4 100644 --- a/servers/physics/physics_server_sw.h +++ b/servers/physics/physics_server_sw.h @@ -31,7 +31,7 @@ /*************************************************************************/ #include "joints_sw.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" #include "shape_sw.h" #include "space_sw.h" #include "step_sw.h" diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h index b8cbf4782..dd851e323 100644 --- a/servers/physics/shape_sw.h +++ b/servers/physics/shape_sw.h @@ -33,7 +33,7 @@ #include "core/containers/local_vector.h" #include "core/math/bsp_tree.h" #include "core/math/geometry.h" -#include "servers/physics_server.h" +#include "core/servers/physics/physics_server.h" /* SHAPE_LINE, ///< plane:"plane" diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index f34ef03ed..5a3dbd882 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -63,7 +63,7 @@ #include "physics_2d/physics_2d_server_sw.h" #include "physics_2d/physics_2d_server_wrap_mt.h" #include "physics_2d_server.h" -#include "physics_server.h" +#include "core/servers/physics/physics_server.h" #include "rendering/shader_types.h" #include "scene/debugger/script_debugger_remote.h" @@ -99,7 +99,7 @@ Physics2DServer *_createPandemoniumPhysics2DCallback() { void register_server_types() { ClassDB::register_class(); - ClassDB::register_virtual_class(); + ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); ClassDB::register_virtual_class(); @@ -209,7 +209,6 @@ void unregister_server_types() { void register_server_singletons() { Engine::get_singleton()->add_singleton(Engine::Singleton("AudioServer", AudioServer::get_singleton())); - Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer", PhysicsServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("Physics2DServer", Physics2DServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer", NavigationServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("Navigation2DServer", Navigation2DServer::get_singleton()));